cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kerri Shotts <>
Subject [Feature Request] Shell script hooks should receive the project's root directory as an argument
Date Tue, 26 Mar 2013 03:54:22 GMT
Correct me if I'm wrong, but it doesn't look like there's any (simple) way to get the project's
root directory if the hook is a shell script. When I echo $#, I have 0 incoming arguments,
and so my script is currently limited to throwing an error if the cordova-cli isn't executed
from an expected directory. I've also done "set", but didn't see any environment variables
that would function in the same way as an argument specifying the project's root.

Feel free to close as appropriate, but I felt it might be nice to raise an issue, since it
would be easier to write shell script hooks if the shells script knew how to get back to the
root without having to write some not-so-fun code to traverse the project's directory structure.

I'd submit a pull myself, but I'm not a node.js expert (which is why I didn't write my hook
in node.js either). I can't imagine it would be a difficult thing to add, but I'm not an expert
in this arena, and so perhaps there's also a very good reason why shell scripts don't have
access to this information.

Anyway, the issue is at, and if there is an
easy way to get the project's root, I'd be happy to hear it. :-)

Kerri Shotts
photoKandy Studios, LLC

On the Web:

Social Media:
          Twitter: @photokandy,

Apps on the Apple Store:


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message