mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-20 16:20:18 +01:00
Fix a few bugs related to execution on Windows
This commit is contained in:
parent
0fb30e99ec
commit
06063d5ee6
3 changed files with 4 additions and 3 deletions
|
@ -27,6 +27,7 @@ func _ready():
|
|||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("save"):
|
||||
if text_edit.visible:
|
||||
save()
|
||||
|
||||
func clear():
|
||||
|
|
2
shell.gd
2
shell.gd
|
@ -60,7 +60,7 @@ func run(command, crash_on_fail=true):
|
|||
# On Windows, if the command contains a newline (even if inside a string),
|
||||
# execution will end. To avoid that, we first write the command to a file,
|
||||
# and run that file with bash.
|
||||
var script_path = game.tmp_prefix_inside + "command"
|
||||
var script_path = game.tmp_prefix_inside + "command" + str(randi())
|
||||
helpers.write_file(script_path, hacky_command)
|
||||
result = helpers.exec(_shell_binary(), [script_path], crash_on_fail)
|
||||
else:
|
||||
|
|
|
@ -43,8 +43,8 @@ func save():
|
|||
text += "\n"
|
||||
|
||||
helpers.write_file(fixme_path+path, text)
|
||||
emit_signal("saved")
|
||||
close()
|
||||
emit_signal("saved")
|
||||
|
||||
func close():
|
||||
if _client_connection and _client_connection.is_connected_to_host():
|
||||
|
|
Loading…
Reference in a new issue