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

Updating linked platform removes original files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5.0
    • None
    • cordova-cli
    • iOS

    Description

      updating a linked platform tries to remove the symlink, but the shell helper traverses into the link and wipes out the original source files.

      test:

      $ cordova create link-test
      Creating a new cordova project.
      $ cd link-test/
      $ cordova platform add --link ../../cordova-ios
      Adding ios project...
      iOS project created with cordova-ios@4.0.0-dev and has a linked CordovaLib
      $ ll platforms/ios/
      total 8
      ...
      lrwxr-xr-x   1 tripod  staff  -   50B Aug 25 15:35 CordovaLib@ -> /Users/tripod/codez/cordova/cordova-ios/CordovaLib
      ...
      
      $ cordova platform update ios
      Updating ios project...
      rm: could not remove directory (code ENOTDIR): /Users/tripod/codez/cordova/test/link-test/platforms/ios/CordovaLib
      
      Error: /Users/tripod/.cordova/lib/npm_cache/cordova-ios/3.9.1/package/bin/update: Command failed with exit code 1
          at ChildProcess.whenDone (/Users/tripod/codez/cordova/cordova-lib/cordova-lib/src/cordova/superspawn.js:139:23)
          at ChildProcess.emit (events.js:110:17)
          at maybeClose (child_process.js:1008:16)
          at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
      
      $ ll platforms/ios/
      ...
      lrwxr-xr-x   1 tripod  staff  -   50B Aug 25 15:35 CordovaLib@ -> /Users/tripod/codez/cordova/cordova-ios/CordovaLib
      ...
      
      $ ll ../../cordova-ios/CordovaLib/
      total 0
      drwxr-xr-x   2 tripod  staff  -   68B Aug 25 15:35 ./
      drwxr-xr-x  23 tripod  staff  -  782B Aug 13 18:07 ../
      

      Attachments

        Activity

          People

            macdonst Simon MacDonald
            tripod Tobias Bocanegra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: