From 2d54fc9fa484ab2cf120fdf9bed22bcbb870dcac Mon Sep 17 00:00:00 2001 From: Tako Schotanus Date: Wed, 2 Oct 2013 16:50:30 +0200 Subject: [PATCH] Some changes to verbose handling because the run tool now uses the standard ceylon tool base class, so it inherits the default "verbose" option implementation (ceylon/ceylon-runtime#26) --- .../modules/bootstrap/CeylonRunTool.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bootstrap/src/main/java/ceylon/modules/bootstrap/CeylonRunTool.java b/bootstrap/src/main/java/ceylon/modules/bootstrap/CeylonRunTool.java index ab650a6..17cece0 100644 --- a/bootstrap/src/main/java/ceylon/modules/bootstrap/CeylonRunTool.java +++ b/bootstrap/src/main/java/ceylon/modules/bootstrap/CeylonRunTool.java @@ -59,8 +59,6 @@ public class CeylonRunTool extends RepoUsingTool { private String moduleNameOptVersion; private String run; - private boolean verbose = false; - private String verboseFlags = ""; private List args = Collections.emptyList(); public CeylonRunTool() { @@ -87,11 +85,10 @@ 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 @@ -99,6 +96,9 @@ public void run() throws IOException { ArrayList argList = new ArrayList(); String ceylonVersion = System.getProperty(Constants.PROP_CEYLON_SYSTEM_VERSION); + if (ceylonVersion == null) { + ceylonVersion = Versions.CEYLON_VERSION_NUMBER; + } String sysRep; if (systemRepo != null) { @@ -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); } }