vscode-code-runner icon indicating copy to clipboard operation
vscode-code-runner copied to clipboard

[Bug] - Cannot run .command file using code runner in MacOS

Open Shababsoft opened this issue 3 years ago • 1 comments

  • VS Code Version: 1.49
  • OS Version: Mac OS 10.15
  • Code Runner Version: 0.11

Describe the bug I am having an issue with running the .command file or .bat file in Mac OS, however, it was working fine in Windows. When I running the command in Terminal it is working fine but when executing the .command file using Code Runner, I am getting the following error.

[Running] cmd /c "/Users/test/Workspace/Bitbucket/www.example.com/s3-sync.command" /bin/sh: cmd: command not found

[Done] exited with code=127 in 0.01 seconds

To Reproduce Steps to reproduce the behaviour:

  1. Create a simple command file with a command
  2. Run the file in VS Code using the plugin

Actual behavior Description of what happened actually.

Expected behavior Description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Shababsoft avatar Sep 17 '20 22:09 Shababsoft

I don't think macOS allow window batch file(.cmd or .bat) to run, unless you use VM. If yout want to run it, find a alternative version in bash language then try to run it.

lokesh-kurre avatar Dec 15 '21 20:12 lokesh-kurre