From 01f2fef475b1554420dd1724dee746d426dc3ff7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 2 Apr 2020 20:27:13 +0200 Subject: [PATCH] Fix mis-named variable and fix building in a specified directory using docker. --- cdist | 8 +++++--- 1 file 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') -- 2.30.2