Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
feat: show command on script error
Browse files Browse the repository at this point in the history
  • Loading branch information
joelgomes1994 committed Jun 17, 2022
1 parent 71fea3f commit ca9ea57
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scenes/editor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,10 @@ func _get_resource(path: String) -> String:


func _run_script(script_path: String, script_args: Array) -> void:
var result = []
var args = [_get_resource(script_path), "--project", globals.current_project_path]
var result := []
var args := [_get_resource(script_path), "--project", globals.current_project_path]
args.append_array(script_args)
var text = "Please wait, running task..."
var text := "Please wait, running task..."

$AcceptDialog/TextEdit.text = text
$AcceptDialog.popup_centered_ratio(POPUP_RATIO)
Expand All @@ -555,7 +555,10 @@ func _run_script(script_path: String, script_args: Array) -> void:
text = "Task completed!"
else:
text = "Could not execute task! Error: " + str(_error)
var _args := PoolStringArray(args)
text += "\nCommand: " + str(_get_python_current_os()) + " " + _args.join(" ")

$AcceptDialog/TextEdit.text = text
$AcceptDialog.popup_centered_ratio(POPUP_RATIO)
_update_task_buttons()

0 comments on commit ca9ea57

Please sign in to comment.