Skip to content

Commit ddc05b5

Browse files
committed
Fix behavior of no-argument invocation to use lint
1 parent a670911 commit ddc05b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/plutil/PLUContext.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ enum PLUCommand {
218218

219219
self = .create(CreateCommand(output: outputFileHandle, errorOutput: errorFileHandle, arguments: arguments, format: format))
220220
default:
221-
// No other command
222-
self = .lint(LintCommand(output: outputFileHandle, errorOutput: errorFileHandle, arguments: arguments))
221+
// Use lint by default. Restore the name of the file we popped off thinking it was the command name.
222+
self = .lint(LintCommand(output: outputFileHandle, errorOutput: errorFileHandle, arguments: [specifiedCommand] + arguments))
223223
}
224224
}
225225
}

0 commit comments

Comments
 (0)