Closed Andriamanitra closed 1 month ago
Gave the changes a try.
Both invocations seemed to work :+1:
When a file named foo
did not exist I got an error like:
error: could not find file foo
in dofile [boot.janet] on line 2966, column 5
in c-switch [boot.janet] (tail call) on line 4477, column 19
in cli-main [boot.janet] on line 4520, column 13
which seemed helpful.
Changes behavior of
-c
flag such that:janet -c foo.janet
writes tofoo.jimage
janet -c foo
writes tofoo.jimage
Previously these would cause a confusing error due to out of bounds access to the args array (see #1451).
The default is only used if there are no more arguments after the input file – I didn't add any special handling for edge cases like
janet -c foo.janet -h
(which uses '-h' as the output file).closes #1451