You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Filip Maj (JIRA)" <ji...@apache.org> on 2013/03/28 21:05:18 UTC

[jira] [Resolved] (CB-2811) Shell script hooks should receive the project's root directory as an argument

     [ https://issues.apache.org/jira/browse/CB-2811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Maj resolved CB-2811.
---------------------------

       Resolution: Fixed
    Fix Version/s: 2.7.0

Added this feature to master branch along with tests. Will be fixed in 2.7.0.

https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;a=commit;h=69a49e484a33fc54a87aeeeac77bb43fcdecf094
                
> 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
>             Fix For: 2.7.0
>
>
> 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