diff --git a/platform/linuxbsd/export/export_plugin.cpp b/platform/linuxbsd/export/export_plugin.cpp index 77f2c79c33e..c63096cd642 100644 --- a/platform/linuxbsd/export/export_plugin.cpp +++ b/platform/linuxbsd/export/export_plugin.cpp @@ -192,7 +192,7 @@ void EditorExportPlatformLinuxBSD::get_export_options(List *r_opti "\"{temp_dir}/{exe_name}\" {cmd_args}"; String cleanup_script = "#!/usr/bin/env bash\n" - "kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")\n" + "pkill -x -f \"{temp_dir}/{exe_name} {cmd_args}\"\n" "rm -rf \"{temp_dir}\""; r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "ssh_remote_deploy/enabled"), false, true)); diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp index 60e339756a9..edebfe66260 100644 --- a/platform/macos/export/export_plugin.cpp +++ b/platform/macos/export/export_plugin.cpp @@ -595,7 +595,7 @@ void EditorExportPlatformMacOS::get_export_options(List *r_options "open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"; String cleanup_script = "#!/usr/bin/env bash\n" - "kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")\n" + "pkill -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\"\n" "rm -rf \"{temp_dir}\""; r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "ssh_remote_deploy/enabled"), false, true));