diff --git a/moulin/build_generator.py b/moulin/build_generator.py index e6dcab4..49984df 100644 --- a/moulin/build_generator.py +++ b/moulin/build_generator.py @@ -100,7 +100,7 @@ def generate_fetcher_dyndep(conf: MoulinConfiguration, component: str): def _gen_regenerate(conf_file_name, generator: ninja_syntax.Writer): - this_script = os.path.abspath(sys.argv[0]) + this_script = os.path.basename(sys.argv[0]) args = " ".join(sys.argv[1:]) generator.rule("regenerate", command=f"{this_script} {args}", generator=1) generator.newline() diff --git a/moulin/utils.py b/moulin/utils.py index 189fe92..10684cf 100644 --- a/moulin/utils.py +++ b/moulin/utils.py @@ -16,7 +16,7 @@ def create_stamp_name(*args): def construct_fetcher_dep_cmd() -> str: "Generate command line to generate fetcher dependency file" - this_script = os.path.abspath(sys.argv[0]) + this_script = os.path.basename(sys.argv[0]) args = " ".join(sys.argv[1:]) return f"{this_script} {args} --fetcherdep $name"