File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,9 @@ exit_code=$?
234
234
235
235
# Display an error alert if gdvm failed
236
236
if [ $exit_code -ne 0 ]; then
237
+ # Strip ANSI color codes from the output
238
+ output=$(echo "$output" | sed 's/\x1B\[[0-9;]*[JKmsu]//g')
239
+
237
240
# Escape backslashes and double quotes
238
241
escaped_output=$(printf '%s' "$output" | sed 's/\\/\\\\/g; s/"/\\"/g')
239
242
@@ -313,6 +316,9 @@ output=$("$HOME/.gdvm/bin/godot" "$@" 2>&1)
313
316
exitCode=$?
314
317
315
318
if [ $exitCode -ne 0 ]; then
319
+ # Strip ANSI color codes from the output
320
+ output=$(echo "$output" | sed 's/\x1B\[[0-9;]*[JKmsu]//g')
321
+
316
322
zenity --error --text="$output" || \
317
323
kdialog --error "$output" || \
318
324
Xdialog --msgbox "$output" 0 0 || \
You can’t perform that action at this time.
0 commit comments