mirror of
https://github.com/wentasah/ros2nix.git
synced 2025-06-09 15:52:23 +03:00
Fix errors when package.xml is in the current directory
This commit is contained in:
parent
2595123e12
commit
8528f3558f
1 changed files with 2 additions and 2 deletions
|
@ -366,7 +366,7 @@ def ros2nix(args):
|
|||
kwargs["src_param"] = args.src_param
|
||||
kwargs["src_expr"] = args.src_param
|
||||
elif args.fetch:
|
||||
srcdir = os.path.dirname(source)
|
||||
srcdir = os.path.dirname(source) or "."
|
||||
url = subprocess.check_output(
|
||||
"git config remote.origin.url".split(), cwd=srcdir
|
||||
).decode().strip()
|
||||
|
@ -416,7 +416,7 @@ def ros2nix(args):
|
|||
if args.output_dir is None:
|
||||
kwargs["src_expr"] = "./."
|
||||
else:
|
||||
kwargs["src_expr"] = f"./{os.path.relpath(os.path.dirname(source), args.output_dir)}"
|
||||
kwargs["src_expr"] = f"./{os.path.dirname(os.path.relpath(source, args.output_dir)) or '.'}"
|
||||
|
||||
if args.source_root:
|
||||
kwargs["source_root"] = args.source_root.replace('{package_name}', pkg.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue