Skip to content

Commit

Permalink
Treat empty ALIBUILD_* environment vars as unset (#717)
Browse files Browse the repository at this point in the history
This is less surprising behaviour.
  • Loading branch information
TimoWilken authored Oct 15, 2021
1 parent bdb83db commit d708a25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions alibuild_helpers/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
from os.path import abspath, dirname, basename
import sys

# Default workdir: fall back on "sw" if env is not set
DEFAULT_WORK_DIR = os.environ.get("ALIBUILD_WORK_DIR", os.environ.get("ALICE_WORK_DIR", "sw"))
# Default workdir: fall back on "sw" if env is not set or empty
DEFAULT_WORK_DIR = os.environ.get("ALIBUILD_WORK_DIR") or os.environ.get("ALICE_WORK_DIR") or "sw"

# cd to this directory before start
DEFAULT_CHDIR = os.environ.get("ALIBUILD_CHDIR", ".")
DEFAULT_CHDIR = os.environ.get("ALIBUILD_CHDIR") or "."

def csv_list(s):
return s.split(',')
Expand Down
2 changes: 1 addition & 1 deletion alibuild_helpers/doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def doctorArgParser(parser):
parser.add_argument("--docker-image", dest="dockerImage",
help="Image to use in case you build with docker (implies --docker)")
parser.add_argument("--chdir", "-C", help="Change to the specified directory first",
metavar="DIR", dest="chdir", default=os.environ.get("ALIBUILD_CHDIR", "."))
metavar="DIR", dest="chdir", default=os.environ.get("ALIBUILD_CHDIR") or ".")
return parser

def doDoctor(args, parser):
Expand Down

0 comments on commit d708a25

Please sign in to comment.