Skip to content

Commit

Permalink
Always print the version when executing windup
Browse files Browse the repository at this point in the history
  • Loading branch information
jsight committed Aug 6, 2015
1 parent 45cf9f4 commit 8a89820
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -263,6 +263,7 @@ else if (arg.startsWith("--updateRules"))
List<String> windupArguments = new ArrayList<>(unknownArgs);
if (!windupArguments.isEmpty())
{
commands.add(new DisplayVersionCommand(CommandResult.CONTINUE));
commands.add(new RunWindupCommand(windupArguments, batchMode));
}

Expand Down
Expand Up @@ -7,12 +7,23 @@

public class DisplayVersionCommand implements Command
{
private final CommandResult result;

public DisplayVersionCommand()
{
result = CommandResult.EXIT;
}

public DisplayVersionCommand(CommandResult result)
{
this.result = result;
}

@Override
public CommandResult execute()
{
System.out.println(Bootstrap.getVersionString());
return CommandResult.EXIT;
return result;
}

@Override
Expand Down

0 comments on commit 8a89820

Please sign in to comment.