check if not already there
This commit is contained in:
parent
d14ae1725e
commit
f507f0536e
1 changed files with 4 additions and 4 deletions
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
"""Entry point."""
|
"""Entry point."""
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
|
from os import environ, pathsep
|
||||||
|
|
||||||
import env
|
import env
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ if env.SPCD_PYTHON_VENV_PACKAGES not in sys.path:
|
||||||
import spcd
|
import spcd
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.environ["PATH"] = os.pathsep.join(
|
paths = environ["PATH"].split(pathsep)
|
||||||
[env.SPCD_PYTHON_VENV_BINARIES, os.environ["PATH"]]
|
if env.SPCD_PYTHON_VENV_BINARIES not in paths:
|
||||||
)
|
environ["PATH"] = pathsep.join([env.SPCD_PYTHON_VENV_BINARIES, *paths])
|
||||||
spcd.main(__file__)
|
spcd.main(__file__)
|
||||||
|
|
Loading…
Reference in a new issue