diff options
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 369b411..c720242 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -139,11 +139,11 @@ class CommandLineParser: parser.add_argument('script_args', nargs=argparse.REMAINDER) def run_runpython_command(self, options): - import runpy + sys.argv[1:] = options.script_args if options.eval_arg: exec(options.script_file) else: - sys.argv[1:] = options.script_args + import runpy sys.path.insert(0, os.path.dirname(options.script_file)) runpy.run_path(options.script_file, run_name='__main__') return 0 |