ci: allow specifying pmbootstrap path to aid running locally (MR 4994)
I don't like how CI requires pmbootstrap in PATH to be a symlink, I use a wrapper script to handle running pmbootstrap how I want and the current pmbootstrap path detection is kinda annoying since it depends on it being a symlink. This allows using an environment variable, PMBOOTSTRAP_PATH, to set the pmbootstrap path and skip all of the symlink resolving stuff.
This commit is contained in:
parent
07812a9189
commit
40a46fd4e5
1 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,13 @@ def path_pmbootstrap():
|
|||
code from there.
|
||||
returns: pmbootstrap installation folder
|
||||
"""
|
||||
|
||||
if path:= os.environ.get("PMBOOTSTRAP_PATH"):
|
||||
if os.path.exists(path):
|
||||
return path
|
||||
else:
|
||||
print("WARNING: PMBOOTSTRAP_PATH is invalid, trying to detect correct path...")
|
||||
|
||||
# This variable is set by pmbootstrap 1.52 and later
|
||||
# If it's undefined, try to find 'pmbootstrap' in path
|
||||
bin = os.environ.get("PMBOOTSTRAP_CMD") or shutil.which("pmbootstrap")
|
||||
|
|
Loading…
Reference in a new issue