1. 27 Oct, 2018 2 commits
  2. 10 Sep, 2018 1 commit
  3. 09 Sep, 2018 1 commit
  4. 22 Jul, 2018 4 commits
  5. 15 Jul, 2018 1 commit
    • Eric Huss's avatar
      Fix msys detection with new winapi. · 272d0bd0
      Eric Huss authored
      Ever since winapi version 0.3.5, tty detection for msys terminals has been
      broken.  The definition for FILE_NAME_INFO struct changed in
      retep998/winapi-rs#607, causing the first character from the filename to be cut
      off.
      272d0bd0
  6. 30 Apr, 2018 3 commits
  7. 21 Apr, 2018 5 commits
    • softprops's avatar
      docs.rs and master branch docs · c754880e
      softprops authored
      c754880e
    • softprops's avatar
      use shields.io for crates badge · 1d01bedc
      softprops authored
      1d01bedc
    • softprops's avatar
      bump version · 0ab37bcf
      softprops authored
      0ab37bcf
    • doug tangren's avatar
      Merge pull request #25 from BurntSushi/ag/fix-pty-detection · cb98312e
      doug tangren authored
      fix pty detection
      cb98312e
    • Andrew Gallant's avatar
      fix pty detection · 55ab829b
      Andrew Gallant authored
      This commit fixes a recent regression in pty detection for the cygwin
      terminal. In particular, in 0.2.6, things worked:
      
          $ git checkout 0.2.6
          $ cargo run --example atty
          stdout? true
          stderr? true
          stdin? true
      
      But in 0.2.7, things stopped working:
      
          $ git checkout 0.2.7
          $ cargo run --example atty
          stdout? false
          stderr? false
          stdin? false
      
      Namely, all three of these should have returned `true`. The specific
      reason why this stopped working was because #24 introduced a change to
      the detection logic where *both* the 'msys' and 'pty' strings needed to
      be in the file descriptor's name, where the previous logic merely
      required either of them. It turns out that both were wrong. For example,
      in my cygwin terminal, the name of the stdout/stderr file descriptors is
      (from the above example):
      
          \\cygwin-c5e39b7a9d22bafb-pty2-to-master
      
      and stdin is:
      
          \\cygwin-c5e39b7a9d22bafb-pty2-from-master
      
      This makes it clear why the regression happened, since this string only
      contains `pty` but not `msys`.
      
      If I run
      
          echo foo | cargo run --example atty
      
      then the stdin file name is `\\cygwin-c5e39b7a9d22bafb-8728-pipe-0x5`.
      My guess is that #24 fixes the case when the stdin file name is
      something like `\\msys-c5e39b7a9d22bafb-8728-pipe-0x5`, where the
      previous logic would have falsely reported that as a tty on stdin.
      
      In this commit, we change the logic to require the `pty` substring, and
      additionally require *either* the `cygwin` or `msys` strings. The latter
      check is strictly to reduce the rate of false positives (in the case
      that an actual file name contains the substring `pty`).
      55ab829b
  8. 07 Mar, 2018 5 commits
  9. 05 Mar, 2018 2 commits
    • Alex Crichton's avatar
      Change `||` to `&&` for whether MSYS is a tty · 3953f3ad
      Alex Crichton authored
      The MSYS terminal appears to create pipes with the name `msys-` but *don't*
      contain `-pty`, so this changes the `||` logic to `&&` to ensure that the logic
      here doesn't fire for MSYS terminals where piping is used to erroneously
      diagnose a stdio stream as a tty.
      
      Closes #23
      3953f3ad
    • Alex Crichton's avatar
      Fix an inverted condition on MinGW · a8027b97
      Alex Crichton authored
      I was reading over this crate a bit and found this (didn't actually run into it
      in the wild), but it seems like the intention here may have been to return
      `false` (aka not a tty) if `GetFileInformationByHandleEx` failed!
      a8027b97
  10. 20 Dec, 2017 6 commits
  11. 30 Sep, 2017 5 commits
  12. 08 Aug, 2017 5 commits