diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-11-10 10:33:33 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-11-10 10:33:33 +0200 |
commit | 96c3606757750dadfcf31ec5ccd7787292da9273 (patch) | |
tree | baddf2d763cd523cbcf5e2cbe1a2f74ee514d9f4 | |
parent | 73d9542edf54dd05bcdc0a6096c8cb224b6f51c9 (diff) | |
download | vmadm-96c3606757750dadfcf31ec5ccd7787292da9273.tar.gz |
fix: prepend Cargo target directory to PATH
Sponsored-by: author
-rw-r--r-- | subplot/vmadm.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subplot/vmadm.py b/subplot/vmadm.py index 473a673..e6cd234 100644 --- a/subplot/vmadm.py +++ b/subplot/vmadm.py @@ -9,7 +9,11 @@ import yaml def install_vmadm(ctx): runcmd_prepend_to_path = globals()["runcmd_prepend_to_path"] srcdir = globals()["srcdir"] - runcmd_prepend_to_path(ctx, os.path.join(srcdir, "target", "debug")) + + # Add the directory with built Rust binaries to the path. + default_target = os.path.join(srcdir, "target") + target = os.environ.get("CARGO_TARGET_DIR", default_target) + runcmd_prepend_to_path(ctx, dirname=os.path.join(target, "debug")) # Set permissions on the datadir and its parent. They are 0o700 by default, # which means that the libvirt daemon can't access the virtual machine |