why does this code not run here in Atom?
it runs in CODPEN
This doesn’t have anything to do with your code.
script (not Atom, because the package is not the editor) is unable to find the file. What command are you using to run the code?
What happens if you try to run a file that isn’t inside any folders with spaces in their names?
working now thank you
Okay, I know what’s happening.
script is sending the instruction to your OS as
gcc C:\Path\To The\File
when it should be
gcc "C:\Path\To The\File"
gcc thinks that the path is actually
C:\Path\To (spaces in shell commands separate the arguments). This is a bug in the package.
Thanks for the help, I was scratching my head for awhile on this.
Hi I am new to JAVAscrpit and atom but Im still getting this error and am not sure where to change the gcc file path to the correct format.
You can remove the spaces in your folder names, or you can use a different package that handles spaces correctly. I don’t use any script-runner packages (I run everything through the command line or
process-palette), so I can’t tell you what will work better for your needs.
I highly recommend
process-palette for any and all needs. It lets you customize everything about how a command is issued.