Command line arguments?
crazydef opened this issue · comments
What's your question?
Is there a reference page detailing all the standard command line arguments for Premake?
https://premake.github.io/docs/Command-Line-Arguments only explains how to create new ones.
premake5 --help
just throws an error.
premake5 --help
should do the job...
But if you have an "invalid" premake5.lua, error might happen (See #1967).
I recommend to have
if (_ACTION == nil) then
return
end
at the beginning of the script, after potential newaction
/newoption
to reduce possible errors.
I didn't have any premake5.lua file in the directory where I was running it. I just wanted to check the command line args to confirm my suspicions about a different script I was looking at.
Can you confirm what version of premake you are using and the operating system? Running 5.0.0-beta2 from a folder without premake files on Windows 11, I am not able to reproduce.
Hmm, I just tried again and it also works for me now. (On Linux.) Not sure how I managed to break it earlier.
But well, it's clearly not a problem. Sorry for the confusion. :)
No worries!
Follow up question: If I have a working premake5.lua
file that loads extension modules, will the help text be updated with new options and parameters added by an extension?
(I.e., can I use premake5 --help
to confirm that a module is being loaded correctly?)
Yes (as long as newaction
/newoption
is called).
but as I said previously, script should be valid.
I (wrongly) used to use _ACTION
which is nil
with --help
, so dereferencing it might be problematic...