You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Overhaul CLI argument forwarding to processes started by the editor
This commit is contained in:
@@ -1626,15 +1626,16 @@ void EditorNode::restart_editor() {
|
||||
|
||||
List<String> args;
|
||||
|
||||
const Vector<String> &forwardable_args = Main::get_forwardable_cli_arguments(Main::CLI_SCOPE_TOOL);
|
||||
for (int i = 0; i < forwardable_args.size(); i++) {
|
||||
args.push_back(forwardable_args[i]);
|
||||
}
|
||||
|
||||
args.push_back("--path");
|
||||
args.push_back(ProjectSettings::get_singleton()->get_resource_path());
|
||||
|
||||
args.push_back("-e");
|
||||
|
||||
if (OS::get_singleton()->is_disable_crash_handler()) {
|
||||
args.push_back("--disable-crash-handler");
|
||||
}
|
||||
|
||||
if (to_reopen != String()) {
|
||||
args.push_back(to_reopen);
|
||||
}
|
||||
@@ -3072,6 +3073,10 @@ void EditorNode::_discard_changes(const String &p_str) {
|
||||
String exec = OS::get_singleton()->get_executable_path();
|
||||
|
||||
List<String> args;
|
||||
const Vector<String> &forwardable_args = Main::get_forwardable_cli_arguments(Main::CLI_SCOPE_TOOL);
|
||||
for (int i = 0; i < forwardable_args.size(); i++) {
|
||||
args.push_back(forwardable_args[i]);
|
||||
}
|
||||
args.push_back("--path");
|
||||
args.push_back(exec.get_base_dir());
|
||||
args.push_back("--project-manager");
|
||||
|
||||
Reference in New Issue
Block a user