Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-5358

titanium.py script doesn't exit with non-zero exit code when failing to create module project

    Details

      Description

      I'm trying to work on module tooling in Titanium Studio and while testing generation of an Android mobile module project I ended up with an empty directory. After debugging, I see that the underlying process is returning a 0 exit code, but is actually failing. We typically use the exit code as an indicator of success or failure for native processes, and bubble up the failure based on that. In this case we got a 0 so we assumed success and never notified the user of the root cause.

      Here's what I saw as the output of the process in the debugger:

      Traceback (most recent call last):
      File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/module/module.py", line 319, in <module>
      main(sys.argv)
      File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/module/module.py", line 316, in main
      module = ModuleProject(config['platform'],project_dir,config)
      File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/module/module.py", line 63, in __init__
      self.platform_delegate = ModulePlatform.create_platform(platform, project_dir, config, self)
      File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/module/module.py", line 34, in create_platform
      return platform_module_class(project_dir, config, module)
      File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/module/android/android.py", line 26, in __init__
      print "[ERROR] Couldn't find the Google APIs r%s add-on directory" % self.sdk.DEFAULT_API_LEVEL
      AttributeError: AndroidSDK instance has no attribute 'DEFAULT_API_LEVEL'
      Created android module project null
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                billdawson Bill Dawson
                Reporter:
                cwilliams Christopher Williams
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code