[ https://issues.apache.org/jira/browse/CB-7928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Craig Payne updated CB-7928: ---------------------------- Description: {quote} $ cordova create name com.name.app NAME —-copy-from ~/Cordova/Cordova-4.0.0-Examples/Cordova-Examples/barcode/ SyntaxError: Unexpected token — at Object.parse (native) at cli (/usr/local/lib/node_modules/cordova/src/cli.js:230:24) at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:1) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 $ cordova -v 4.0.0 {quote} I have a fresh copy of The Examples: $ git clone https://github.com/cfjedimaster/Cordova-Examples.git Cloning into 'Cordova-Examples'... remote: Counting objects: 191, done. remote: Total 191 (delta 0), reused 0 (delta 0) Receiving objects: 100% (191/191), 1.19 MiB | 512.00 KiB/s, done. Resolving deltas: 100% (35/35), done. Checking connectivity... done. $ I had just updated (cleanly on the 3rd try) to Cordova 4.0.0. My copy of cli.js has this at line 230: {code} } else if (cmd == 'create') { var cfg = {}; // If we got a fourth parameter, consider it to be JSON to init the config. if ( undashed[4] ) { cfg = JSON.parse(undashed[4]); <--- line 230 } {code} was: {quote} $ cordova create name com.name.app NAME —-copy-from ~/Cordova/Cordova-4.0.0-Examples/Cordova-Examples/barcode/ SyntaxError: Unexpected token — at Object.parse (native) at cli (/usr/local/lib/node_modules/cordova/src/cli.js:230:24) at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:1) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 $ cordova -v 4.0.0 {quote} I have a fresh copy of The Examples: $ git clone https://github.com/cfjedimaster/Cordova-Examples.git Cloning into 'Cordova-Examples'... remote: Counting objects: 191, done. remote: Total 191 (delta 0), reused 0 (delta 0) Receiving objects: 100% (191/191), 1.19 MiB | 512.00 KiB/s, done. Resolving deltas: 100% (35/35), done. Checking connectivity... done. $ I had just updated (cleanly on the 3rd try) to Cordova 4.0.0. My copy of cli.js has this at line 230: {quote} } else if (cmd == 'create') { var cfg = {}; // If we got a fourth parameter, consider it to be JSON to init the config. if ( undashed[4] ) { cfg = JSON.parse(undashed[4]); <--- line 230 } {quote} > --copy-from fails with "SyntaxError: Unexpected token -" > -------------------------------------------------------- > > Key: CB-7928 > URL: https://issues.apache.org/jira/browse/CB-7928 > Project: Apache Cordova > Issue Type: Bug > Components: CLI > Affects Versions: 4.0.0 > Environment: MacOS 10.9.5 > Reporter: Craig Payne > Priority: Minor > > {quote} > $ cordova create name com.name.app NAME —-copy-from > ~/Cordova/Cordova-4.0.0-Examples/Cordova-Examples/barcode/ > SyntaxError: Unexpected token — > at Object.parse (native) > at cli (/usr/local/lib/node_modules/cordova/src/cli.js:230:24) > at Object.<anonymous> > (/usr/local/lib/node_modules/cordova/bin/cordova:41:1) > at Module._compile (module.js:456:26) > at Object.Module._extensions..js (module.js:474:10) > at Module.load (module.js:356:32) > at Function.Module._load (module.js:312:12) > at Function.Module.runMain (module.js:497:10) > at startup (node.js:119:16) > at node.js:902:3 > $ cordova -v > 4.0.0 > {quote} > I have a fresh copy of The Examples: > $ git clone https://github.com/cfjedimaster/Cordova-Examples.git > Cloning into 'Cordova-Examples'... > remote: Counting objects: 191, done. > remote: Total 191 (delta 0), reused 0 (delta 0) > Receiving objects: 100% (191/191), 1.19 MiB | 512.00 KiB/s, done. > Resolving deltas: 100% (35/35), done. > Checking connectivity... done. > $ > I had just updated (cleanly on the 3rd try) to Cordova 4.0.0. My copy of > cli.js has this at line 230: > {code} > } else if (cmd == 'create') { > var cfg = {}; > // If we got a fourth parameter, consider it to be JSON to init the > config. > if ( undashed[4] ) { > cfg = JSON.parse(undashed[4]); <--- line 230 > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org