Skip to content
Snippets Groups Projects
Verified Commit 40a46fd4 authored by Clayton Craft's avatar Clayton Craft :speech_balloon:
Browse files

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.
parent 07812a91
No related branches found
No related tags found
No related merge requests found
......@@ -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")
......
  • Administrator @root

    mentioned in merge request !5033 (merged)

    By Newbyte on 2024-04-23T20:03:57

    · Imported

    mentioned in merge request !5033 (merged)

    By Newbyte on 2024-04-23T20:03:57

    Edited by Ghost User
    Toggle commit list
  • Administrator @root

    mentioned in commit 28f8f313

    By clayton craft on 2024-04-24T18:54:53

    · Imported

    mentioned in commit 28f8f313

    By clayton craft on 2024-04-24T18:54:53

    Edited by Ghost User
    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment