Feature request
OS I use : Windows 10
Hello,
When you export a game, you cannot open files with it

When you use a file path as an argument, godot tries to load the file, and if it is not a *.tscn or a "project.godot", it throws this error
ERROR: No loader found for resource: C:/Users/matth/Documents/Anglais/file.txt At: core/io/resource_loader.cpp:186
Then it quits without even loading the code
The problem is that Godot has an API to be used by command line
Usage: C:\Users\matth\Documents\Anglais\Cloze 0.2.exe [options] [path to scene or 'project.godot' file]
That is convenient to be used in the editor, but not so much for an exported project...
As the program closes, you don't have the opportunity to use OS.get_cmdline_args()
I think it might be a good thing to be able to override a little bit the command line API for exported projects.
I think you can workaround this by specifying arguments with something like key=value but I can't find the doc for that...
Also this makes me wonder if that would not be a security hole? Like, take any game built with Godot, put a TSCN you made yourself next to it, call the executable of the game with that argument, and poof you can mine it and hack it with your own code.
Well, you can indeed send arguments to the game with the command line or by making a link (on windows at least).
You can get them by code with OS.get_cmdline_args()

Sadly this is not user-friendly...
This issue seems to be a duplicate of #8721 (the underlying cause is the same), so I'll close this one. Thanks for reporting it :slightly_smiling_face:
Most helpful comment
I think you can workaround this by specifying arguments with something like
key=valuebut I can't find the doc for that...Also this makes me wonder if that would not be a security hole? Like, take any game built with Godot, put a TSCN you made yourself next to it, call the executable of the game with that argument, and poof you can mine it and hack it with your own code.