Skip to content

Conversation

@qaisjp
Copy link
Contributor

@qaisjp qaisjp commented Jan 10, 2026

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 Fix #461: printing version doesn'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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

moonc cli needs to support args even when file is not included

1 participant