Skip to content

Commit

Permalink
Add the environment's PYTHONPATH to sys.path when running dev pants.
Browse files Browse the repository at this point in the history
This is helpful when running a graphical debugger: you need to ensure that
the debugger's code (pydevd in my case) is on your path so you can import
it at the tracepoint.

Reviewed at https://rbcommons.com/s/twitter/r/1237/
  • Loading branch information
benjyw authored and Benjy committed Oct 29, 2014
1 parent 3e823dc commit 14eaac5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pants
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function run_pants_bare() {

function exec_pants_bare() {
activate_pants_venv
PYTHONPATH="${PANTS_SRCPATH}" exec python ${PANTS_EXE} "$@"
PYTHONPATH="${PANTS_SRCPATH}:${PYTHONPATH}" exec python ${PANTS_EXE} "$@"
}

if [ ! -z "${PANTS_DEV}" ]; then
Expand Down

0 comments on commit 14eaac5

Please sign in to comment.