Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: early exit on non-existent script files
When trying to run PyInstaller against non-existent script file(s), exit with error message immediately, before writing the spec file and trying to build it. This prevents us from overwriting an existing (and customized) .spec file if user makes a typo in the .spec file's suffix when trying to build it, for example, `pyinstaller program.cpes`. It also prevents creation of a .spec file when `pyinstaller program.py` is accidentally ran from a directory that does not contain the script (for example, due to failing to change the directory prior to running the command). This applies only to the `pyinstaller` command (and the equivalent `python -m PyInstaller` invocation); the `pyi-makespec` command is still allowed to be called with non-existent script file(s) that might be added later, before the actual build attempt with the generated .spec file.
- Loading branch information