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

cordova/lib/list-devices script is faulty on Windows

    XMLWordPrintableJSON

Details

    Description

      When trying to run 'cordova/lib/list-devices.bat' script from windows platform directory, getting following error:

      d:\cordova\mobile spec>platforms\windows\cordova\lib\list-devices.bat
      [eval]:1 
      require('./d:\cordova\mobile 
              ^^^^^^^^^^^^^^^^^^^^ 
      SyntaxError: Unexpected token ILLEGAL 
          at Object.<anonymous> ([eval]-wrapper:6:22) 
          at Module._compile (module.js:456:26) 
          at evalScript (node.js:536:25) 
          at startup (node.js:80:7) 
          at node.js:906:3 
      

      Cause is that script's path environment variable is not expanded correctly while running inline NodeJS script.
      Solution is to place JS logic into standalone JS file (use wp8 platform as sample).

      list-emulator-images and list-started-emulators commands also can be ported from wp8 tooling to preserve code consistency.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vladimir.kotikov Vladimir Kotikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: