Skip to content

Commit

Permalink
[UPDATE] Subprocess adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
hullabaloo-vincent committed Jul 25, 2024
1 parent 19d653c commit d4c9f6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions commands/navi_system.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/python3
import subprocess
import subprocess # nosec
import navi_internal
import shlex
from navi import get_command_path

command = "navi_sys"
Expand All @@ -16,11 +17,11 @@ def run(arguments=None):
user_input = input("Do you want me to continue (y/n): ").strip().lower()
if user_input == 'y':
result = subprocess.run(
navi_command,
shell=True,
shlex.split(navi_command, comments=False, posix=True),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True
universal_newlines=True,
shell=False
)
output = f"Output: \n{result.stdout}" if result.stdout else ""
navi_instance.print_message(f"\nDone! {output}")
Expand Down
2 changes: 1 addition & 1 deletion navi_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import requests
import os
import sys
import subprocess
import subprocess # nosec
import zipfile
import shutil

Expand Down

0 comments on commit d4c9f6e

Please sign in to comment.