mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Merge pull request #43028 from Carbonhell/tgcode/shelleo
Escapes the quotes in the shell call
This commit is contained in:
@@ -25,7 +25,10 @@
|
||||
shelleo_ids[shelleo_id] = TRUE
|
||||
out_file = "[SHELLEO_NAME][shelleo_id][SHELLEO_OUT]"
|
||||
err_file = "[SHELLEO_NAME][shelleo_id][SHELLEO_ERR]"
|
||||
errorcode = shell("[interpreter] \"[command]\" > [out_file] 2> [err_file]")
|
||||
if(world.system_type == UNIX)
|
||||
errorcode = shell("[interpreter] \"[replacetext(command, "\"", "\\\"")]\" > [out_file] 2> [err_file]")
|
||||
else
|
||||
errorcode = shell("[interpreter] \"[command]\" > [out_file] 2> [err_file]")
|
||||
if(fexists(out_file))
|
||||
stdout = file2text(out_file)
|
||||
fdel(out_file)
|
||||
|
||||
Reference in New Issue
Block a user