jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds/jclouds-cli] JCLOUDS-1189: Handle arguments with spaces (#34)
Date Wed, 02 Nov 2016 13:02:24 GMT
nacx commented on this pull request.

> @@ -254,7 +254,12 @@ private void run(final CommandProcessorImpl commandProcessor, String[]
args, fin
                 if (i > 0) {
                     sb.append(" ");
-                sb.append(args[i]);
+                if (args[i].contains(" ")) {
+                    // quote arguments with spaces
+                    sb.append("\"").append(args[i]).append("\"");

Given [this comment](http://karaf.922171.n3.nabble.com/Karaf-shell-command-argument-with-space-td4027039.html#a4027040)
I assume arguments with spaces in karaf need to be quoted. The problem is just how we "pass"
those quotes from our runner script to the Main class, to then build the proper karaf command.
Given the link above (despite not being a karaf expert), I'd say this approach is OK.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
View raw message