Laurent Deketelaere created CB-9186:
---------------------------------------
Summary: process.argv is different when it's defined in config.xml
or in hooks/ directory
Key: CB-9186
URL: https://issues.apache.org/jira/browse/CB-9186
Project: Apache Cordova
Issue Type: Bug
Components: CLI
Environment: 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
Reporter: Laurent Deketelaere
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 :
{code}
[ 'node',
'/PROJECT/hooks/before_prepare/before_prepare_config_edit.js',
'/PROJECT' ]
{code}
When script is declared in config.xml :
{code}
// <hook type="before_prepare" src="hooks/before_prepare_config_edit.js"/>
[ 'node',
'/usr/local/bin/cordova',
'run',
'android',
'--release' ]
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]