Skip to content

handle error when where is not on PATH - #4044

Merged
nerdneha merged 2 commits into
masterfrom
where-is-the-error
Feb 22, 2018
Merged

nerdneha merged 2 commits into
masterfrom
where-is-the-error

Conversation

@shiftkey

@shiftkey shiftkey commented Feb 19, 2018 •

Copy link
Copy Markdown
Member

Fixes #3882
Fixes #3825

  • using the full path to where when spawning, in case it doesn't exist on PATH
  • handling the error event in case this doesn't exist on disk, and logging a message
  • confirm START without cmd.exe and powershell.exe on PATH is also resolved

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 19, 2018
@shiftkey

Copy link
Copy Markdown
Member Author

Just tested that "Open in Command Prompt" and "Open in PowerShell" work when they can't be found onPATH:

@shiftkey shiftkey added this to the 1.1.x milestone Feb 19, 2018
@nerdneha nerdneha self-assigned this Feb 21, 2018
@nerdneha

Copy link
Copy Markdown
Contributor

@shiftkey lol @ this branch name.

@nerdneha
nerdneha merged commit 3477812 into master Feb 22, 2018
@shiftkey

Copy link
Copy Markdown
Member Author

@nerdneha I didn't expect for this to go out for 1.1 (hence moving it to 1.1.x) but I'll let @niik or @iAmWillShepherd chime in about whether they're fine with this going out. Otherwise we can revert it.

@shiftkey
shiftkey deleted the where-is-the-error branch February 22, 2018 10:43
@iAmWillShepherd

iAmWillShepherd commented Feb 22, 2018 •

Copy link
Copy Markdown
Contributor

@shiftkey This changes seems fine to ship since you only made the path explicit. This shouldn't cause unintended consequences right?

Mainly thinking of computers that don't use English as the native language. Do they still name that path C:\Windows\System32\where.exe?

@shiftkey

shiftkey commented Feb 22, 2018 •

Copy link
Copy Markdown
Member Author

Mainly thinking of computers that don't use English as the native language. Do they still name that path C:\Windows\System32\where.exe?

The only gotcha I can think of is that some users might install Windows to a different drive to C:\, and that we should use %SYSTEMROOT% instead of hard-coding C:\Windows\.

And now that I say it out loud, I'll open a PR to do just this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants