andrewgaul 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("\"");

I tested quote handling with 1.9.1 and 2.0.0 with this commit:

```
$ bin/jclouds-cli-1.9.1/bin/jclouds blobstore read $CONTAINER '"' out
IO error: unexpected EOT looking for matching quote: "

$ bin/jclouds-cli-1.9.1/bin/jclouds blobstore read $CONTAINER 'foo "bar"' out
Error executing command jclouds:blobstore-read: too many arguments specified
```

```
$ bin/jclouds-cli-2.0.0-SNAPSHOT/bin/jclouds blobstore read $CONTAINER '"' out
IO error: unexpected EOT looking for matching quote: "

$ bin/jclouds-cli-2.0.0-SNAPSHOT/bin/jclouds blobstore read $CONTAINER 'foo 
"bar"' out
Blob not found: foo bar not found in container gaulovrclk-us-east-1: while 
getting blob
```

Karaf eats the quotes but we do not regress the behavior.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-cli/pull/34

Reply via email to