Github user mmocny commented on a diff in the pull request: https://github.com/apache/cordova-browser/pull/4#discussion_r20823145 --- Diff: bin/templates/project/cordova/run --- @@ -20,10 +20,33 @@ */ var shell = require('shelljs'), - spawn = require('child_process').spawn, - project = 'file://' + shell.pwd() + '/platforms/browser/www/index.html'; + fs = require('fs'); +var configFile = shell.pwd() + '/config.xml'; +var configXML = fs.readFileSync(configFile, 'utf8'); +var sourceFile = /<content[\s\S]*?src\s*=\s*"(.*?)"/i.exec(configXML); +var spawn = require('child_process').spawn, + tmpDir = '/tmp/temp_chrome_user_data_dir_for_cordova_browser/', + project = 'file://' + shell.pwd() + '/platforms/browser/www/' + sourceFile[1]; + +fs.mkdir(tmpDir); --- End diff -- I get an error that dir is already created if I run this twice. Also, this call is async so is dangerous as is. Probably you want to use `shelljs` instead: `shelljs.mkdir('-p', tmpDir).
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org