Revert "Warn on unknown command line arguments"

This reverts commit 8379cc85aa.

This caused some regressions, as this approach doesn't properly handle all
possible arguments.
This commit is contained in:
Rémi Verschelde 2024-11-15 21:48:51 +01:00
parent 6c05ec3d67
commit 4d4407ce5a
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1801,13 +1801,6 @@ 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);
}