plasma-umass / cwhy

"See why!" Explains and suggests fixes for compile-time errors for C, C++, C#, Go, Java, LaTeX, PHP, Python, Ruby, Rust, and TypeScript
Apache License 2.0
272 stars 6 forks source link

Changed shebang path to sys.executable #26

Closed eddieantonio closed 1 year ago

eddieantonio commented 1 year ago

Changed the hardcoded shebang path to sys.executable. This will ensure that the generated wrapper script uses the same Python interpreter and environment (installed packages) as the cwhy executable invoked on the command line.

The use case is if you install cwhy through something like pipx, the wrapper script will use the interpreter of its isolated environment. Otherwise, you get an ModuleNotFoundError: No module named 'cwhy' error.

nicovank commented 1 year ago

Thanks!