From 1e34091266350fabe5e6030f3fb32c704bc38415 Mon Sep 17 00:00:00 2001 From: "hyunsik.noh" Date: Tue, 11 Feb 2014 16:42:47 +0900 Subject: [PATCH] CLI: Fix cli-config usage to make working in Windows. Change-Id: Icc84812312c7a295c0e9a74e3108bea6ee21a779 Signed-off-by: hyunsik.noh --- .../src/org/tizen/ncli/ide/shell/ConfigCLI.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/org.tizen.ncli.ide/src/org/tizen/ncli/ide/shell/ConfigCLI.java b/org.tizen.ncli.ide/src/org/tizen/ncli/ide/shell/ConfigCLI.java index 11200ad..618396a 100644 --- a/org.tizen.ncli.ide/src/org/tizen/ncli/ide/shell/ConfigCLI.java +++ b/org.tizen.ncli.ide/src/org/tizen/ncli/ide/shell/ConfigCLI.java @@ -46,7 +46,8 @@ import org.tizen.ncli.ide.subcommands.ConfigCLICommand; public class ConfigCLI extends AbstractCLI{ private Map properties = new HashMap(); - @Argument(metaVar="=",usage="Setting Tizen CLI config with given key=value pair") + @Argument(metaVar="=",usage="Setting Tizen CLI config with given key=value pair\n" + + " In Windows ,the setting values should be enclosed with doublequotes like as \"=\"") private void setConfigProperty(final String property) throws CmdLineException { log.trace("setConfigProperty {}",property); if( null == property || property.startsWith("-")) return; @@ -77,19 +78,20 @@ public class ConfigCLI extends AbstractCLI{ configCommand.setGlobal(global); configCommand.setKeyValue(properties); - Configuration tizenCLIConfig = configCommand.runCommand(); - //Printout result of command if( !list && properties.isEmpty()) { printUsage(); return; } + + Configuration tizenCLIConfig = configCommand.runCommand(); + if(list) { - Collection allKeys = tizenCLIConfig.getAllKeys(); - for (String key : allKeys) { - output.format("%1$s=%2$s\n", key,tizenCLIConfig.getValue(key)); - } - + Collection allKeys = tizenCLIConfig.getAllKeys(); + for (String key : allKeys) { + output.format("%1$s=%2$s\n", key,tizenCLIConfig.getValue(key)); + } + }else if(global){ progressLog.info("Setting global configuration is succeeded....\n"); }else { -- 2.7.4