Skip to content

Commit

Permalink
fix case where nom-shell is in not in PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Feb 25, 2024
1 parent d758033 commit a890edf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nixpkgs_review/nix.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def nix_shell(
run: str | None = None,
sandbox: bool = False,
) -> None:
nix_shell = f"{shutil.which(build_graph)}-shell"
nix_shell = shutil.which(build_graph + "-shell")
if not nix_shell:
raise RuntimeError(f"{build_graph} not found in PATH")

Expand Down
4 changes: 2 additions & 2 deletions nixpkgs_review/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def current_system() -> str:


def nix_nom_tool() -> str:
"Return `nom` if found in $PATH"
if shutil.which("nom"):
"Return `nom` and `nom-shell` if found in $PATH"
if shutil.which("nom") and shutil.which("nom-shell"):
return "nom"

return "nix"

0 comments on commit a890edf

Please sign in to comment.