We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 87fa9e8 + b972b0d commit 1a68425Copy full SHA for 1a68425
bin/moonc
100755
100644
@@ -23,13 +23,18 @@ parser:mutex(
23
parser:flag("-",
24
"Read from standard in, print to standard out (Must be only argument)")
25
26
-local read_stdin = arg[1] == "--" -- luacheck: ignore 113
+local read_stdin = arg[1] == "-" -- luacheck: ignore 113
27
28
if not read_stdin then
29
parser:argument("file/directory"):args("+")
30
+else
31
+ if arg[2] ~= nil then
32
+ io.stderr:write("- must be the only argument\n")
33
+ os.exit(1)
34
+ end
35
end
36
-local opts = parser:parse()
37
+local opts = read_stdin and {} or parser:parse()
38
39
if opts.version then
40
local v = require "moonscript.version"
0 commit comments