Skip to content

Commit f12f58c

Browse files
committed
Fix passing arguments
1 parent 5595fa0 commit f12f58c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/docs/en/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Next
4+
5+
### Fixes
6+
- Fix passing arguments
7+
8+
39
## 2.0.0
410

511
### Breaking changes

ownlang-desktop/src/main/java/com/annimon/ownlang/Main.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ public static void main(String[] args) throws IOException {
7373

7474
case "-l":
7575
case "--lint":
76-
final String lintMode = i + 1 < args.length ? args[++i] : LinterStage.Mode.SEMANTIC.name();
76+
final String lintMode = i + 1 < args.length
77+
? args[++i]
78+
: LinterStage.Mode.SEMANTIC.name();
7779
options.lintMode = switch (lintMode.toLowerCase(Locale.ROOT)) {
7880
case "none" -> LinterStage.Mode.NONE;
7981
case "full" -> LinterStage.Mode.FULL;
@@ -106,7 +108,7 @@ public static void main(String[] args) throws IOException {
106108
return;
107109

108110
default:
109-
if (options.programSource == null) {
111+
if (options.programPath == null && options.programSource == null) {
110112
options.programSource = args[i];
111113
createOwnLangArgs(args, i + 1);
112114
}

0 commit comments

Comments
 (0)