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

cordova-create fails with template path containing @ character

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • cordova-create
    • None
    • Windows 7 Pro 64b (CZE)

    Description

      Im afraid that the line https://github.com/apache/cordova-create/blob/53d5894c849193073e65727033e27c8d2e428ac8/index.js#L191 needs serious redesign.

      When one installs nodejs repository (containing the node_modules global repository, where the cordova is installed using the command 'npm install -g cordova') on such a path, that contains a '@' (at) such a for example 'D:\Directory1\ @Directory2\nodejs', then the variable 'isNPM' is evaluated mistakingly as 'true' and a complete different code block is executed than it should be.
      When doing a 'cordova create' from a locally installed template, then the lines https://github.com/apache/cordova-create/blob/53d5894c849193073e65727033e27c8d2e428ac8/index.js#L193-L212 must NOT be run (or at least they throw an error when being called on a local directory)!!!!! But they run, when I have nodejs in a path containing '@'.

      Im sorry, but myself I have not evaluated what is the purpose of these lines and why they are evaluated based on the "@", but a "@" sign is a legal character in a directory name in Windows, so I expect that this should be reflected by the evaluation of isNPM on line 191. Thankx much to those, who might have some clue how to edit this code appropriately, since I would not dare to do so.

      Attachments

        Issue Links

          Activity

            People

              raphinesse Raphael von der GrĂ¼n
              rheingold Lukas Plachy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: