diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-02-24 08:59:25 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-02-24 09:09:52 +0100 |
| commit | ad7233a4a5f45be6f991ed38a7351a6ef826356b (patch) | |
| tree | 7557829a45109e5ac6d83ffd8e40bcf331749f4c /try | |
| parent | 1399a01dc09ed1477b740bd320580ce3dacfe3cf (diff) | |
| download | minishell_test-ad7233a4a5f45be6f991ed38a7351a6ef826356b.tar.gz minishell_test-ad7233a4a5f45be6f991ed38a7351a6ef826356b.tar.bz2 minishell_test-ad7233a4a5f45be6f991ed38a7351a6ef826356b.zip | |
Fixing #17 - Incorporate the try script in the command arguments
Diffstat (limited to 'try')
| -rwxr-xr-x | try | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -1,21 +0,0 @@ -#!/usr/bin/env python3 - -import os -import subprocess -import sys - -from src.config import EXECUTABLES_PATH, MINISHELL_DIR, MINISHELL_EXEC - -if __name__ == "__main__": - if len(sys.argv) != 2: - print("Usage {} command".format(sys.argv[0])) - sys.exit(1) - print("=================== RUNNING " + sys.argv[1]) - process = subprocess.Popen( - [os.path.join(MINISHELL_DIR, MINISHELL_EXEC), "-c", sys.argv[1]], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - env={"PATH": EXECUTABLES_PATH, "TERM": "xterm-256color"} - ) - out, _ = process.communicate() - print(out.decode()) |
