Kerri Shotts created CB-2811:
--------------------------------
Summary: Shell script hooks should receive the project's root
directory as an argument
Key: CB-2811
URL: https://issues.apache.org/jira/browse/CB-2811
Project: Apache Cordova
Issue Type: Improvement
Components: CLI
Affects Versions: 2.5.0
Reporter: Kerri Shotts
Assignee: Filip Maj
Priority: Minor
It's not a big deal, but for my current project, I've got a before_prepare hook
that is a shell script. I tried to see if any parameters were being passed in,
but it doesn't appear as if any are. I also checked to see any anything had
been exported, but also didn't see that.
It would be useful to, at a minimum, have the project's root directory either
passed as a parameter or as an export so that the script would have an anchor
point. Right now, pwd returns whatever directory the cli is executed in, which
isn't always ideal, and so without doing complicated work of searching up the
tree to find .cordova, the script returns with an error should cordova be
executed outside the root directory.
I assume that js hooks probably get all this information, but shell scripts are
just as useful, if not more so for simple file tasks (like copying a
directory), and so should be treated as much as first-class citizens as
possible.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira