command failed in Windows system
See original GitHub issueI can not run any command successfully, for example, I was running eslint-interactive --help
, and an error occurred, the error message is below.
I have tried other commands like eslint-interactive ./src
, same error happened.
I was running the commands in Windows 10 system.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
5 Ways to Fix the "Not Recognized as an Internal or External ...
5 Ways to Fix the "Not Recognized as an Internal or External Command" Error in Windows · 1. Verify if the Program Is...
Read more >How to Fix Command Prompt Not Working in Windows 10 Error
1. Check Antivirus · 2. Command Prompt Shortcut · 3. Create New User · 4. Update Path of System Environment Variables · 5....
Read more >"There was a problem when resetting your PC. No changes ...
Open an elevated command prompt. To do this, click Start, type Command Prompt or cmd in the Search box, right-click Command Prompt, and...
Read more >[RESOLVED] System command failed - CodeGuru Forums
Re: System command failed I change to use errno and found that the error code 22 returned which means invalid argument. Other PCs...
Read more >How to Fix the System Cannot Find the File Specified - EaseUS
In Command Prompt, type the following command: sfc /scannow. Now press Enter. After scanning and correcting errors, restart the computer and ...
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 Free
Top 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
Thanks!
I’ve run the tests (with some small changes, as
diff
,cp
, andrf
don’t work on Windows, and the snapshots assume/
as path delimiter while Windows uses\
), and they pass (except for the ones usingdiff
, I didn’t find a fast workaround to replace the diff command with a windows command).But this unfortunately doesn’t confirm whether the change works, as the changed file isn’t actually tested. The same for building: The only file that changes isn’t built, so builds still give the exact same output as before the PR.
What I did to confirm the change was to install the changed version and run it manually on Windows. This worked. Based on your feedback, I’ve also rechecked with Node 14.13.1, which also works. I’ve also checked via a Codespace on Ubuntu (Ubuntu 22.04.1 LTS) with Node 18.12.1 and 14.13.1, and it works. These are manual tests, so I might have missed some corner cases, but for the workflow of linting, choosing a rule, auto-fixing it, and exiting, I didn’t notice any problems.
In the end, there are also a couple of separate decisions to be made: All options, except for
-S
, can also be kept and the script would still run under Windows. For the first two, this is mainly a question of preference, so I would adapt the PR to add them back if you want to keep them. For the third, based on the manual testing it seems that the option isn’t actually needed - but I might be missing an edge case, and, again, it would be possible to just leave it in. The problematic one is-S
, as this is the one that stops the script from working on Windows. If I missed something when manually testing on Ubuntu, and the option is indeed needed to run there, then this change should not be merged and further investigation is needed.PS: I could also offer to set up a GitHub workflow that runs the tests on each PR to make it easier for you to confirm that the tests are green.
I think Windows support is just as important as Ubuntu and Mac. Therefore, I welcome the pull request!
However, I cannot accept the pull request if it does not pass the test. In order to accept the pull request, could you please try the following on your windows machine?
pnpm run test
to check if it passes.pnpm run build && pnpm run postbuild:test
and check if it passes.import.meta.resolve
is called whenDisplay details of lint results
is executed. So without the--experimental-import-meta-resolve
option, the following test would fail.https://github.com/mizdra/eslint-interactive/blob/500d424d7762bce7801c5bd1f0e00e21c5f310f3/src/core.test.ts#L137-L140
Could you check to see if the test actually fails, and if so, could you fix it? I do not have a windows machine and cannot test it.