mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Directly run the command in the shell
This commit is contained in:
parent
16edb843b7
commit
a60b2f9afb
4 changed files with 17 additions and 19 deletions
|
@ -141,8 +141,12 @@ func toggle_music():
|
|||
|
||||
func shell_test(command):
|
||||
mutex.lock()
|
||||
print("go")
|
||||
#print("go")
|
||||
print(command)
|
||||
var before = OS.get_ticks_msec()
|
||||
var response = $ShellServer.send(command)
|
||||
print("stop")
|
||||
var after = OS.get_ticks_msec()
|
||||
print("took " + str(after-before)+" ms")
|
||||
#print("stop")
|
||||
mutex.unlock()
|
||||
return response
|
||||
|
|
|
@ -53,11 +53,11 @@ func run_async_thread(shell_command):
|
|||
for variable in env:
|
||||
hacky_command += "export %s='%s';" % [variable, env[variable]]
|
||||
|
||||
hacky_command += "export PATH=\'"+game.tmp_prefix+":'\"$PATH\";"
|
||||
#hacky_command += "export PATH=\'"+game.tmp_prefix+":'\"$PATH\";"
|
||||
hacky_command += "cd '%s' || exit 1;" % _cwd
|
||||
hacky_command += command
|
||||
|
||||
print(hacky_command)
|
||||
#print(hacky_command)
|
||||
|
||||
var result
|
||||
var shell_command_internal = game.shell_test(hacky_command)
|
||||
|
|
|
@ -44,8 +44,8 @@ func send(text):
|
|||
var shell_command = ShellCommand.new()
|
||||
shell_command.command = text
|
||||
shell_command.output = response
|
||||
print("response:")
|
||||
print(response)
|
||||
#print("response:")
|
||||
#print(response)
|
||||
shell_command.exit_code = exit_code
|
||||
return shell_command
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue