Skip to content

Commit

Permalink
Make error message clearer when using --recurse if no files are found.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkinkead committed Feb 11, 2016
1 parent 40df7b4 commit 0a55ed1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli/src/main/scala/scalariform/commandline/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ object Main {
errors ::= "Cannot specify files when using --stdin"

if (files.isEmpty && !stdin)
errors ::= "Must specify a file or use --stdin (run with --help for full options)"
if (recurse)
errors ::= "No scala files found in directory or no directory specified"
else
errors ::= "Must specify a file or use --stdin (run with --help for full options)"

if (forceOutput && !stdout && !stdin)
errors ::= "--forceOutput can only be used with --stdout or --stdin"
Expand Down

0 comments on commit 0a55ed1

Please sign in to comment.