-
Notifications
You must be signed in to change notification settings - Fork 236
fix #1444 stat call #716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #1444 stat call #716
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like stat is also at /usr/bin/stat
in Ubuntu18.04.
LGTM!
@@ -232,10 +232,10 @@ function Set-NamedPipeMode { | |||
chmod $DEFAULT_USER_MODE $PipeFile | |||
|
|||
if ($IsLinux) { | |||
$mode = stat -c "%a" $PipeFile | |||
$mode = /usr/bin/stat -c "%a" $PipeFile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If case this comes up again, should we check for an env var for the path to stat that we can tell folks to set if their /usr/bin/stat
binary chokes on a named pipe file? Or we could just do a quick-turn update - now that we have the infrastructure to support such updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should cover our bases - we've tried on Ubuntu, Fedora 28, and macOS - and it's a part of GNU coreutils so it should be at that path on all the supported OS's for PowerShell.
I understand the situation where some one on macOS (which uses the BSD way with -f "%A"
wants to conform to the GNU standard -c %a
- but I don't really see why anyone would overwrite the existing one, they'd just change the symbolic link and the path we have set will still work.
Personally, I think we're okay. But if you want me to check an environment variable, I can :)
Actually... did we ever add that functionality to add an environment variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. You can already do this with an exising VSCode setting:
"terminal.integrated.env.windows": { "FOO": "bar" }
There are equivalent settings for Linux and OSX.
BTW I'm good with the PR as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right! Thnsks Keith 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
be explicit in calling stat since users can install GNU coreutils (which has a different signature) on macOS.