Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace stashcp binary with a bootstrap script #20

Open
bbockelm opened this issue Dec 6, 2016 · 0 comments
Open

Replace stashcp binary with a bootstrap script #20

bbockelm opened this issue Dec 6, 2016 · 0 comments

Comments

@bbockelm
Copy link
Contributor

bbockelm commented Dec 6, 2016

It's really nasty to call #!/usr/bin/env python from a top-level script. There are many places where the user environment can leak through.

Instead, have stashcp be something along the lines of:

#!/bin/sh

# Take out things the user might have in their environment that would mess up the python instance.
unset PYTHONPATH
unset PATH
unset LD_LIBRARY_PATH


PYTHONPATH=$STASHCP_PREFIX/lib/python...
PATH=...

exec python2.7 $STASHCP_PREFIX/bin/stashcp.py "$@"

You know the drill - have the install script automatically hardcode in the correct paths (such as $STASHCP_PREFIX).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant