Closed Sinister78 closed 3 years ago
have you tested it with powershell/bash
?
I hadn't tested in the other shells. I modified the command again (added '--%' after 'cmd') and it now runs under PowerShell as well as Command Prompt, but not Bash.
I don't think there's a syntax that works in all 3 shells. If you remove the 'cmd /C' and the extra double quote, it works in CMD and Bash but not in PowerShell. The only way to get it to work in PowerShell is to either leave 'cmd --%' or remove all quotes and backtick the spaces, but then it doesn't work in the other shells.
In the Python extension, it looks like they test for TerminalShellType and run different syntax based on target shell. For PowerShell they add a '& ' in front of the command with paths surrounded by quotes:
& "C:/Test Dir/red.exe" --cli "C:/Test Dir/hello-world.red"
@Sinister78 Thanks a lot. 👍
The 'Run Current Script' and 'Run Current Script in GUI Console' commands were giving the following error: 'The filename, directory name, or volume label syntax is incorrect.' Changed from enclosing the command and argument in single quotes, to adding an extra double quote in front of the command.
Reference: https://ss64.com/nt/cmd.html