Skip to content

Fix #461: printing version doesn't work with args#462

Open
qaisjp wants to merge 1 commit into
leafo:masterfrom
qaisjp:master
Open

Fix #461: printing version doesn't work with args#462
qaisjp wants to merge 1 commit into
leafo:masterfrom
qaisjp:master

Conversation

@qaisjp

@qaisjp qaisjp commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

Fix #461

No args will print help:

qaisjp@qaispc:~/moonscript$ lua bin/moonc
Usage: bin/moonc
       ([-t <output_to>] | [-o <o>] | [-p] | [-T] | [-b] | [-X]) [-h]
       [-l] [-v] [-w] [--transform <transform>] [-]
       [<file/directory>] ...

Arguments:
   file/directory

Options:
   -h, --help            Show this help message and exit.
   -l, --lint            Perform a lint on the file instead of compiling
   -v, --version         Print version
   -w, --watch           Watch file/directory for updates
   --transform <transform>
                         Transform syntax tree with module
            -t <output_to>,
   --output-to <output_to>
                         Specify where to place compiled files

Version works normally:

qaisjp@qaispc:~/moonscript$ lua bin/moonc  -v
MoonScript version 0.5.0

Version with path works too:

qaisjp@qaispc:~/moonscript$ lua bin/moonc -v hi
MoonScript version 0.5.0
qaisjp@qaispc:~/moonscript$ lua bin/moonc hi -v
MoonScript version 0.5.0

Works fine with file too

qaisjp@qaispc:~/moonscript$ lua bin/moonc foo.moon
foo.moon        Can't find file
@qaisjp qaisjp changed the title Fix #461: printing version doens't work with args Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant