Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-4789

cordova tool should recognize when platforms/$plat directory is deleted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • None
    • None
    • cordova-cli
    • None
    • Mac OSX 10.8.4, Cordova CLI 3.0.9, Xcode build tools 4.6.3 (also tried Xcode 5.0 build tools).

    Description

      Steps:

      cordova create Project com.foo.bar Project
      cd Project
      cordova platform add ios
      cordova plugin add ...
      rm -rf platforms/ios
      cordova platform add ios
      

      This leaves you in a bad state where things work, but plugins are not re-installed by platform add.

      Maybe as a fix we should have some precondition checks before running commands. E.g. validate that our cached state-of-the-world matches reality. In this specific case, the `platform add ios` should first detect that ios was deleted and internally run `platform rm ios` first.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ocq Owen
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: