Repository navigation
Assortment of misuse checks - #8570
Conversation
If a regular user uses sudo or *run as admin* to run PyInstaller with unnecessary privileges, warn them not too, with the intention of turning it into an error in the next breaking release.
For the users who figured out how to open a terminal as admin but never learnt the cd command. In practice, these users are likely still doomed but at least we can prevent them from writing build files into C:\Windows\system32
510aa52 to
4f911e2
Compare
|
Nice! There's another idea if you have time: if PyInstaller is invoked as just |
|
Yeah, why not. Just a Reckon: [shutil.which("pyinstaller", path=i) for i in os.environ.get("PATH", "").split(os.pathsep)]is a close enough approximation of |
I was actually thinking of eventually raising an error, to force the user to think about the ambiguity and resolve it; either by using full path, by using module invocation, or by sanitizing their Or maybe alternatively have them set an
Yeah, that looks like it should do the trick. And is much more elegant that what I had in mind.
True, but that is not the situation we are trying to catch here. |
|
I don't think I can differentiate between someone using a full path and a |
|
Hmmm, you're right. I was under mistaken impression that |
|
It's also a bit messy with pyenv. With pyenv, you don't add > which -a pyinstaller
/home/brenainn/.pyenv/shims/pyinstaller
> pyinstaller
2 WARNING: Found multiple pyinstaller commands installed and in PATH:
['/home/brenainn/.pyenv/versions/3.12.0/bin/pyinstaller',
'/home/brenainn/.pyenv/shims/pyinstaller']
> ~/.pyenv/versions/3.12.0/bin/pyinstaller
# No warning because only ~/.pyenv/shims is in PATH
usage: pyinstaller [-h] |
|
Yeah, let's scrap the idea, then. |
And add some XKCD-1987 themed *current python environment* hints into the logs.
pytest-dev/pytest#11233 overloaded pytest's summary parameter to make it also add tracebacks for xfailed tests. This makes finding the real failures amongst the new xfail error messages painful. Disable this which unfortunately means that we also loose the xfails and xpasses from the short test summary.
4f911e2 to
54e2112
Compare
Having to explain each of these on a regular basis makes me question my life choices.