Skip to content

Commit 96ed053

Browse files
committed
Removed sleep command from command execution for more streamlined experience
1 parent d208999 commit 96ed053

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
@@ -2,7 +2,6 @@
22

33
import subprocess
44
from pathlib import Path
5-
from time import sleep
65
import re
76

87
from textual.app import App, ComposeResult
@@ -625,7 +624,8 @@ def start_ui(file_location: str, write_over: bool, comments: bool) -> None:
625624
# If command is an actual command it will be executed, otherwise it is a list of operations for the composer to use in the edit the file option
626625
if any(substring in ' '.join(command) for substring in ["sudo", "home-manager", "activate"]):
627626
subprocess.run(command, check=True) # To error out if the command fails
628-
sleep(5)
627+
_ = input("Command succesful, press enter to continue...\n") # Just to force the user to press enter we don't care what they input
628+
# We know the command was succesful because otherwise the subprocess run line would have failed!
629629
start_ui(file_location, write_over, comments)
630630
else:
631631
Composer(decomposer.get_tree(), file_location, write_over, comments)

0 commit comments

Comments
 (0)