Skip to content

Commit 5c01e66

Browse files
committed
Fixed subprocess shell
1 parent d3709ad commit 5c01e66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nix_tree/ui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,12 +656,12 @@ def compose(self) -> ComposeResult:
656656
""")
657657
try:
658658
generation_command = subprocess.run("home-manager generations".split(), capture_output=True,
659-
text=True, check=True, shell=True)
659+
text=True, check=True)
660660
yield OptionList(*generation_command.stdout.split("\n")[:-1], id="home-manager-gens")
661661
with Horizontal(id="buttons"):
662662
yield Button(label="switch", variant="success", id="switch_hm")
663663
yield Button(label="build", id="build_hm")
664-
except subprocess.CalledProcessError: # If the user does not have home manager installed
664+
except FileNotFoundError: # If the user does not have home manager installed
665665
yield Static("Home manager options unavailable - first install home-manager!")
666666
with TabPane(title="operations stack", id="operations_stack_tab"):
667667
yield ListView(id="operations_stack")

0 commit comments

Comments
 (0)