Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1720

Command's toString() method does not take whitespaces into account

    XMLWordPrintable

Details

    Description

      In case of invocation of command like this from shell

      android create avd -n fd930b32-69bc-4d52-8313-2c9c27bb4511 -t "Google Inc.:Google APIs:17"
      

      In order to build that command in Spacelift, having

      String target = "Google Inc.:Google APIs:17";
      

      this is necessary to do in order to have the same command in Spacelift

      Command command = new CommandBuilder().add(sdk.getAndroidPath())
          .add("create")
          .add("avd")
          .add("-n")
          .add(configuration.getAvdName())
          .add("-t")
          .add(target).build();
      

      However, command.toString() says that Spacelift invoked this

      android create avd -n fd930b32-69bc-4d52-8313-2c9c27bb4511 -t Google Inc.:Google APIs:17
      

      But it is not true, in fact, it was executed with enclosing quotes because of present spaces in target string which command.toString() has not taken into account.

      Attachments

        Activity

          People

            kpiwko Karel Piwko
            smikloso Stefan Miklosovic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: