Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bin/moonc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ parser:flag("-",
local read_stdin = arg[1] == "-" -- luacheck: ignore 113

if not read_stdin then
parser:argument("file/directory"):args("+")
parser:argument("file/directory"):args("*")
else
if arg[2] ~= nil then
io.stderr:write("- must be the only argument\n")
Expand All @@ -42,6 +42,11 @@ if opts.version then
os.exit()
end

if not read_stdin and #opts["file/directory"] == 0 then
io.stderr:write(parser:get_help())
os.exit()
end

function log_msg(...)
if not opts.p then
io.stderr:write(table.concat({...}, " ") .. "\n")
Expand Down
Loading