diff options
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index e8086db9d3..bdadd24d35 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -653,7 +653,7 @@ void Main::print_help(const char *p_binary) { print_help_option("--delta-smoothing <enable>", "Enable or disable frame delta smoothing [\"enable\", \"disable\"].\n"); print_help_option("--print-fps", "Print the frames per second to the stdout.\n"); #ifdef TOOLS_ENABLED - print_help_option("--editor-pseudolocalization", "Enable pseudolocalization for the editor and the project manager.\n"); + print_help_option("--editor-pseudolocalization", "Enable pseudolocalization for the editor and the project manager.\n", CLI_OPTION_AVAILABILITY_EDITOR); #endif print_help_title("Standalone tools"); @@ -1801,6 +1801,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else if (arg == "--" || arg == "++") { adding_user_args = true; } else { + if (!FileAccess::exists(arg) && !DirAccess::exists(arg)) { + // Warn if the argument isn't recognized by Godot *and* the file/folder + // specified by a positional argument doesn't exist. + // This allows projects to read file or folder paths as a positional argument + // without printing a warning, as this scenario can't make use of user command line arguments. + WARN_PRINT(vformat("Unknown command line argument \"%s\". User arguments should be passed after a -- or ++ separator, e.g. \"-- %s\".", arg, arg)); + } main_args.push_back(arg); } |