-
Notifications
You must be signed in to change notification settings - Fork 15
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: error invalid arg type on WSL systems on url open #118
Closed
kchindam-infy
wants to merge
13
commits into
npm:main
from
kchindam-infy:kc/fix-wsl-error-invalid-arg-type
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9ee9bc2
fix: error invalid arg type on WSL systems on url open
kchindam-infy bb2523f
fix:lint errors
kchindam-infy 65a6845
fix: codeQL issue
kchindam-infy 8d59274
fix: commnad is undefined
kchindam-infy 55d2323
refactor
kchindam-infy ca4528d
code refactor for wsl fix
kchindam-infy 87e1694
Added test cases for 100% code coverage
kchindam-infy e941522
addl test cases
kchindam-infy 4690ab3
fixed failing test cases
kchindam-infy 2d8d5c6
lint fix
kchindam-infy 1d44711
Merge branch 'main' into kc/fix-wsl-error-invalid-arg-type
kchindam-infy e312009
Fixed review comments and updated the test cases
kchindam-infy 73a3afd
fix shell test cases
kchindam-infy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
reject(Object.assign(er, resultError)) | ||
} | ||
|
||
const proc = spawn(cmd, args, opts) | ||
const proc = spawn(cmd, args, { ...opts, shell: true }) | ||
promise.stdin = proc.stdin | ||
promise.process = proc | ||
|
||
|
@@ -141,7 +141,7 @@ | |
if (platform === 'win32') { | ||
// spawnWithShell does not do the additional os.release() check, so we | ||
// have to force the shell here to make sure we treat WSL as windows. | ||
options.shell = process.env.ComSpec | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. setting options.shell was load bearing here, |
||
options.shell = process.env.ComSpec || 'cmd.exe' | ||
// also, the start command accepts a title so to make sure that we don't | ||
// accidentally interpret the first arg as the title, we stick an empty | ||
// string immediately after the start command | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Unsafe shell command constructed from library input Medium