Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,8 @@ def greet(command):
|
|
| 6 |
commandList = command.split(' ')
|
| 7 |
if(commandList[0] == "cd"):
|
| 8 |
os.chdir(commandList[1])
|
|
|
|
|
|
|
| 9 |
else:
|
| 10 |
output = subprocess.run(commandList, stdout=subprocess.PIPE).stdout.decode('utf-8')
|
| 11 |
return f"{command}: \n {output}"
|
|
|
|
| 6 |
commandList = command.split(' ')
|
| 7 |
if(commandList[0] == "cd"):
|
| 8 |
os.chdir(commandList[1])
|
| 9 |
+
output = subprocess.run([pwd], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
| 10 |
+
return f"{command}: \n {output}"
|
| 11 |
else:
|
| 12 |
output = subprocess.run(commandList, stdout=subprocess.PIPE).stdout.decode('utf-8')
|
| 13 |
return f"{command}: \n {output}"
|