cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: [Feature Request] Shell script hooks should receive the project's root directory as an argument
Date Tue, 26 Mar 2013 04:01:19 GMT
Good call, should be easy to add.

On 3/25/13 8:54 PM, "Kerri Shotts" <> wrote:

>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,
>          Tumblr:
>          Github:
>          CoderWall:
>Apps on the Apple Store:

View raw message