Details

      Description

      problem

      If I attempt to run a ti sdk command that requires iterating through the list of installed Titanium SDKs, I get the following error and crash if I have a TiSDK folder with a space in the name (in this case "3.2.0 copy"):

      tlukasavage-mba:backwards tlukasavage$ ti sdk install --branch 3_2_X
      Titanium Command-Line Interface, CLI version 3.2.0-cr3, Titanium SDK version 3.2.0
      Copyright (c) 2012-2013, Appcelerator, Inc.  All Rights Reserved.
       
      Please report bugs to http://jira.appcelerator.org/
       
       
      /usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:184
              throw e;
                    ^
      TypeError: Invalid Version: 3.2.0 copy
          at new SemVer (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/semver/semver.js:271:11)
          at compare (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/semver/semver.js:424:10)
          at Function.gte (/usr/local/lib/node_modules/titanium/node_modules/node-appc/node_modules/semver/semver.js:473:10)
          at Object.gte (/usr/local/lib/node_modules/titanium/node_modules/node-appc/lib/version.js:90:16)
          at /usr/local/lib/node_modules/titanium/lib/commands/sdk.js:731:26
          at Array.filter (native)
          at /usr/local/lib/node_modules/titanium/lib/commands/sdk.js:730:41
          at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:229:13
          at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:139:25
          at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:226:17
      ---------------------------------------------
          at Request.init (/usr/local/lib/node_modules/titanium/node_modules/request/request.js:132:10)
          at new Request (/usr/local/lib/node_modules/titanium/node_modules/request/request.js:105:8)
          at request (/usr/local/lib/node_modules/titanium/node_modules/request/index.js:53:11)
          at fetch (/usr/local/lib/node_modules/titanium/lib/commands/sdk.js:934:2)
          at getBranchBuilds (/usr/local/lib/node_modules/titanium/lib/commands/sdk.js:987:2)
          at /usr/local/lib/node_modules/titanium/lib/commands/sdk.js:561:5
          at Request._callback (/usr/local/lib/node_modules/titanium/lib/commands/sdk.js:949:4)
          at self.callback (/usr/local/lib/node_modules/titanium/node_modules/request/request.js:129:22)
      ---------------------------------------------
          at Request.init (/usr/local/lib/node_modules/titanium/node_modules/request/request.js:132:10)
          at new Request (/usr/local/lib/node_modules/titanium/node_modules/request/request.js:105:8)
          at request (/usr/local/lib/node_modules/titanium/node_modules/request/index.js:53:11)
          at fetch (/usr/local/lib/node_modules/titanium/lib/commands/sdk.js:934:2)
          at doBranch (/usr/local/lib/node_modules/titanium/lib/commands/sdk.js:543:4)
          at /usr/local/lib/node_modules/titanium/lib/commands/sdk.js:722:6
          at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:548:21
          at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:224:13
      

      expected

      I think that instead of causing the command to crash, it should instead print a warning to the screen that says it is an invalid version and that it will be skipping it

      [WARN] invalid SDK version "3.2.0 copy" installed, skipping...
      

      then continue on with the ti sdk command as expected

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              tlukasavage Tony Lukasavage
              Reviewer:
              Tim Poulsen
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-18082
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code