can not run multiple commands in parallel
Describe the bug
Running multiple carbon-now commands simultaneously in the same directoy can cause problems with renaming the output file. It seems like the output file is firstly saved as carbon.png and later renamed to the string specified in the --save-as flag.
The output file could have the name specified in --save-as from the beginning, with no need to rename it later.
To Reproduce Steps to reproduce the behavior:
- Clone this repository
- run
npm i - run
npm start(might have to be executed multiple times)
Sometime a conversions failes with the following error:
Error while converting test/main.py: Error: Command failed: npx carbon-now test/main.py --save-as test-main.py --save-to .\exports
✖ Fetching beautiful image [FAILED: ENOENT: no such file or directory, rename '~\exports\carbon.png' -> '~\exports\test-main.py.png']
Error: Sending code to https://carbon.now.sh went wrong.
This is mostly due to:
· Nonsensical input like `--start 10 --end 2`
· Carbon being down or taking too long to respond
· Your internet connection not working or being too slow
Additional info:
ENOENT: no such file or directory, rename '~\exports\carbon.png' -> '~\exports\test-main.py.png'
Expected behavior All commands should be able to run in parallel.
Info (please complete the following information):
- OS [e.g. macOS, Linux, Windows, iOS]: Windows 10
--engineused [e.g.chromium,firefox,webkit]: chromium (default)- Carbon URL (run with
--open-in-browserto see) [e.g. carbon.now.sh?bg=pink]: Neither browser window is opened nor is the image copyid to the clipboard, even if ran in console one at a time
Code snippet
Hey @EcoFreshKase, thanks for opening. Been quite swamped since the beginning of the year, but I will tackle a new release of the CLI soon and, amongst other things, address this. 🙂 Thanks for your patience, appreciated!
P. S.: Nice user name, haha.