summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-02 20:27:13 +0200
committerCarl Hetherington <cth@carlh.net>2020-04-02 20:27:13 +0200
commit01f2fef475b1554420dd1724dee746d426dc3ff7 (patch)
tree5f8e84f82b8f98c4d7d0fea63f9e88ad6ed32f96
parentc2627a770f87c85fab9366366acee7cd54ef8c85 (diff)
Fix mis-named variable and fix building in a specified directory using docker.
-rwxr-xr-xcdist8
1 files changed, 5 insertions, 3 deletions
diff --git a/cdist b/cdist
index ff04fdf..8d3fe6f 100755
--- a/cdist
+++ b/cdist
@@ -323,11 +323,11 @@ def get_options(args, target):
if len(b) != 2:
raise Error("Bad option `%s'" % o)
if b[1] == 'False':
- opts[b[0]] = False
+ options[b[0]] = False
elif b[1] == 'True':
- opts[b[0]] = True
+ options[b[0]] = True
else:
- opts[b[0]] = b[1]
+ options[b[0]] = b[1]
# Add defaults for any unspecified options
tree = globals.trees.get(args.project, args.checkout, target)
tree.add_defaults(options)
@@ -1086,6 +1086,8 @@ def main():
if args.work is not None:
args.work = os.path.abspath(args.work)
+ if not os.path.exists(args.work):
+ os.makedirs(args.work)
if args.project is None and args.command != 'shell':
raise Error('you must specify -p or --project')