We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5492b5 commit 43635a3Copy full SHA for 43635a3
src/nixos_anywhere_pxe/__init__.py
@@ -19,8 +19,13 @@
19
20
FILE = Union[None, int, IO]
21
22
-NIXOS_ANYWHERE_SH = Path(__file__).parent.absolute() / "src/nixos-anywhere.sh"
23
-
+# use nixos-anywhere if available, else use unpackaged shell script for development
+NIXOS_ANYWHERE_SH = shutil.which("nixos-anywhere")
24
+if NIXOS_ANYWHERE_SH is not None:
25
+ # i prefer not having huge nix-store paths in the logs
26
+ NIXOS_ANYWHERE_SH = "nixos-anywhere"
27
+else:
28
+ NIXOS_ANYWHERE_SH = Path(__file__).parent.absolute() / "src/nixos-anywhere.sh"
29
30
def run(
31
cmd: Union[str, list[str]],
0 commit comments