Skip to content

Commit

Permalink
Some changes to verbose handling because the run tool now uses the st…
Browse files Browse the repository at this point in the history
…andard ceylon tool base class, so it inherits the default "verbose" option implementation (#26)
  • Loading branch information
quintesse committed Oct 2, 2013
1 parent 7dac09c commit 2d54fc9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions bootstrap/src/main/java/ceylon/modules/bootstrap/CeylonRunTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ public class CeylonRunTool extends RepoUsingTool {

private String moduleNameOptVersion;
private String run;
private boolean verbose = false;
private String verboseFlags = "";
private List<String> args = Collections.emptyList();

public CeylonRunTool() {
Expand All @@ -87,18 +85,20 @@ public void setRun(String run) {
@OptionArgument(argumentName = "flags")
@Description("Produce verbose output. " +
"If no `flags` are given then be verbose about everything, " +
"otherwise just be vebose about the flags which are present. " +
"Allowed flags include: `cmr`.")
public void setVerbose(String verboseFlags) {
this.verbose = true;
this.verboseFlags = verboseFlags;
"otherwise just be verbose about the flags which are present. " +
"Allowed flags include: `all`, `loader`, `cmr`.")
public void setVerbose(String verbose) {
super.setVerbose(verbose);
}

@Override
public void run() throws IOException {
ArrayList<String> argList = new ArrayList<String>();

String ceylonVersion = System.getProperty(Constants.PROP_CEYLON_SYSTEM_VERSION);
if (ceylonVersion == null) {
ceylonVersion = Versions.CEYLON_VERSION_NUMBER;
}

String sysRep;
if (systemRepo != null) {
Expand All @@ -116,11 +116,11 @@ public void run() throws IOException {
argList.add("-offline");
}

if (verbose) {
if (verboseFlags == null || verboseFlags.isEmpty()) {
if (verbose != null) {
if (verbose.isEmpty()) {
argList.add("-verbose");
} else {
argList.add("-verbose:" + verboseFlags);
argList.add("-verbose:" + verbose);
}
}

Expand Down

0 comments on commit 2d54fc9

Please sign in to comment.