Command Mode not working on Windows
See original GitHub issueBug
- version: 1.10.8
- platform: windows
Description
The command mode does not work correctly on windows. The problem seems to be in the parsing of the CLI arguments. On Windows the arguments get split at every space and ignores any '
that should group arguments to a single command.
Example
command: npx start-test start:storybook 4001 'jest --config tests/screenshot/jest.config.js --ci'
actual behavior
compare the second line between Windows and Ubuntu
Windows Debug Output
> npx start-test start:storybook 4001 'jest --config tests/screenshot/jest.config.js --ci'
start-server-and-test parsing CLI arguments: [ 'start:storybook', '4001', "'jest", '--config', 'tests/screenshot/jest.config.js', "--ci'" ]
throw err;
^
Error: expected <NPM script name that starts server> <url or port> <NPM script name that runs tests>
example: start-test start 8080 test
see https://github.com/bahmutov/start-server-and-test#use
at lazyAssLogic (workdir\node_modules\lazy-ass\index.js:110:14)
at lazyAss (workdir\node_modules\lazy-ass\index.js:115:28)
at Object.getArguments (workdir\node_modules\start-server-and-test\src\utils.js:35:5)
at Object.<anonymous> (workdir\node_modules\start-server-and-test\src\bin\start.js:10:22)
at Module._compile (internal/modules/cjs/loader.js:1157:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
at Module.load (internal/modules/cjs/loader.js:1001:32)
at Function.Module._load (internal/modules/cjs/loader.js:900:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
Ubuntu Debug Output
> npx start-test start:storybook 4001 'jest --config tests/screenshot/jest.config.js --ci'
start-server-and-test parsing CLI arguments: [ 'start:storybook', '4001', 'jest --config tests/screenshot/jest.config.js --ci' ]
start-server-and-test parsed args: { start: 'npm run start:storybook', url: [ 'http://localhost:4001' ], test: 'jest --config tests/screenshot/jest.config.js --ci' }
expected behaviour
- execute jest with config in ci mode instead of throwing an error
- parse commands like on Ubuntu and in the README
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Command Prompt not working or opening in Windows 11/10
Command Prompt not working or opening in Windows 11/10 · Launch Command Prompt from File Explorer. · Try opening Command Prompt from Task...
Read more >Fixed: Command Prompt Not Working in Windows 11/10
Command Prompt is not working in Windows 11/10 ; Fix 1. Use CMD Alternative, Run CMD alternative software > Right-click target partition to...
Read more >How to Fix Command Prompt Not Working in Windows 10 Error
How to Fix Command Prompt Not Working in Windows 10 Error · 1. Check Antivirus · 2. Command Prompt Shortcut · 3. Create...
Read more >8 Ways to Fix the Windows Command Prompt When It's ...
8 Ways to Fix the Windows Command Prompt When It's Unresponsive · 1. Close Active Tasks or Restart Your Device · 2. Access...
Read more >Command Prompt Not Working Or Opening on Windows 11 or ...
Fix: Command Prompt Not Working Or Opening on Windows 11 or 10 · Fix 1 – Try ending task of cmd in task...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you open a pull request with tests I will gladly see to it
Sent from my iPhone
🎉 This issue has been resolved in version 1.12.3 🎉
The release is available on:
npm package (@latest dist-tag)
Your semantic-release bot 📦🚀