`shell/lint.sh` fails with exit code 1 without giving proper error
See original GitHub issueDescribe the bug
I think the bug has to do with improper exclusion of venv
folder by both shell/format.sh
and shell/lint.sh
, since on running format.sh
the script starts formatting code install in virtual environment installed packages, i.e., in venv
folder. If terminal session is closed before this process, then leads to lint.sh
failing to pass as it includes venv
directory “unformatted” code.
To Reproduce I am using Windows system to format my code, No WSL and using VirtualEnv environment created using PyCharm (doesn’t matter).
Expected behavior
format.sh
and lint.sh
should exclude venv
folder in the operation.
Would you like to help us fix it? Definitely.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
how to fix the issue "Command /bin/sh failed with exit code 1 ...
Target -> Build-Phases -> update examples. Click On Run checkbox if not selected.
Read more >Command /bin/sh failed with exit code 1 - Shell Script ... - GitHub
This is no issue when building and running in the simulator. The text was updated successfully, but these errors were encountered: ...
Read more >Returning information from a shell script via an Exit Code
This value can indicate different reasons for failure. For example, GNU grep returns 0 on success, 1 if no matches were found, and...
Read more >Linux and Unix exit code tutorial with examples - George Ornbo
Tutorial on using exit codes from Linux or UNIX commands. Examples of how to get the exit code of a command, how to...
Read more >Job is failed with Exit code 1
The exit code is zero in agent log because the script was ran successfully by the agent without any errors. The reason why...
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 FreeTop 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
Top GitHub Comments
This probably might definitely have to do with PowerShell on windows, but still leaves some questions yet to be answered.
format.sh
to stop giving any error with proposed solution of whitelisting the intended files (targets
).isort
continues to fails with error, “Broken 1 Path”, when it is given the same inputtargets
as informat.sh
.🤔format.sh
lint.sh
Even more interestingly,
isort
runs perfectly fine when ran directly from command line:The above issue was resolved by switching from
"${targets}"
to${targets}
.That means when I was running the command directly from command line, the command looked something like this:
Whereas with
"${targets}"
the command which were running looked like this:Learned hard way.