Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Bug
-
None
-
None
-
Cordova Android 4.0.2
Cordova version: 5.1.1
Node version: v0.12.2
MAC OS X 10.9.5
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
Description
process.argv is different when it's defined in config.xml or in hooks/ directory.
process.argv[2] isn't rootdir when is running from config.xml
When script is put in hooks/before_prepare :
[ 'node', '/PROJECT/hooks/before_prepare/before_prepare_config_edit.js', '/PROJECT' ]
When script is declared in config.xml :
// <hook type="before_prepare" src="hooks/before_prepare_config_edit.js"/> [ 'node', '/usr/local/bin/cordova', 'run', 'android', '--release' ]