Skip to content

Commit 7f3e6b6

Browse files
authored
Merge pull request #938 from andre-richter/fix-assume-filename
Fix rejected assumeFilename when path argument is '-'
2 parents a2acc60 + 8c22eb6 commit 7f3e6b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Sources/swift-format/Subcommands/LintFormatOptions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ struct LintFormatOptions: ParsableArguments {
107107
throw ValidationError("'--recursive' is only valid when formatting or linting files")
108108
}
109109

110-
if assumeFilename != nil && !paths.isEmpty {
110+
if assumeFilename != nil && !(paths.isEmpty || paths == ["-"]) {
111111
throw ValidationError("'--assume-filename' is only valid when reading from stdin")
112112
}
113113

0 commit comments

Comments
 (0)