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

`cordova create` should fail fast when directory already exists

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: cordova-cli
    • Labels:
      None

      Description

      Running "cordova create" twice with the same args results in:

      $ cordova create CordovaAppHarness org.apache.appharness CordovaAppHarness
      $ cordova create CordovaAppHarness org.apache.appharness 
      
      mkdir: path already exists: /Users/agrieve/git/cordova/cordova-app-harness/CordovaAppHarness/.cordova/hooks/after_build
      
      mkdir: path already exists: /Users/agrieve/git/cordova/cordova-app-harness/CordovaAppHarness/.cordova/hooks/after_compile
      
      mkdir: path already exists: /Users/agrieve/git/cordova/cordova-app-harness/CordovaAppHarness/.cordova/hooks/after_docs
      
      mkdir: path already exists: /Users/agrieve/git/cordova/cordova-app-harness/CordovaAppHarness/.cordova/hooks/after_emulate
      
      mkdir: path already exists: /Users/agrieve/git/cordova/cordova-app-harness/CordovaAppHarness/.cordova/hooks/after_platform_add
      
      mkdir: path already exists: /Users/agrieve/git/cordova/cordova-app-harness/CordovaAppHarness/.cordova/hooks/after_platform_rm
      
      ...
      

      The second run should just fail with an error message.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kamrik Mark Koudritsky
                Reporter:
                agrieve Andrew Grieve
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: