Skip to content
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: Allows urql-devtools to launch via Windows PowerShell #378

Merged

Conversation

thecodedrift
Copy link
Contributor

Resolves an issue where in powershell "npm" is not a valid command, and uses the correct "npm.cmd" executable instead. Test plan ran since checkout on windows has issues:

  • install globally via npm install -g urql-devtools
  • cd into the AppData/roaming directory for node_modules
  • make change directly to the cli.js file
  • launch using the global bin command "urql-devtools"

Fixes: #377

Resolves an issue where in powershell "npm" is not a valid command, and
uses the correct "npm.cmd" executable instead. Test plan ran since
checkout on windows has issues:
* install globally via npm install -g urql-devtools
* cd into the AppData/roaming directory for node_modules
* make change directly to the cli.js file
* launch using the global bin command "urql-devtools"

Fixes: urql-graphql#377
@andyrichardson
Copy link
Collaborator

@jakobo on second thought - have you set up your path correctly?

I think the current state will work fine as long as npm is correctly set in your path.

@andyrichardson
Copy link
Collaborator

Closing for now (see #377)

@andyrichardson
Copy link
Collaborator

Reopening as it looks like we have confirmation this isn't a path/environment issue

@thecodedrift
Copy link
Contributor Author

Hey all, anything you need from me to get this over the line?

As an alternative, we can also spawn with shell:true as long as we're comfortable with the shell requirements for that spawn option

The shell should understand the -c switch. If the shell is 'cmd.exe', it should understand the /d /s /c switches and command-line parsing should be compatible.

Default: '/bin/sh' on Unix, process.env.ComSpec on Windows.

Official Documentation: https://nodejs.org/api/child_process.html#spawning-bat-and-cmd-files-on-windows

@andyrichardson
Copy link
Collaborator

Apologies @jakobo lets get this in 👍

@andyrichardson andyrichardson merged commit 9a9aa5a into urql-graphql:master Nov 12, 2021
@thecodedrift thecodedrift deleted the jakobo/377/spawn_windows branch November 13, 2021 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot launch via Windows (Powershell or Command prompt)
2 participants