cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-6077) Hooks are not run unless -d flag is used
Date Thu, 20 Feb 2014 01:19:19 GMT

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

Andrew Grieve resolved CB-6077.
-------------------------------

    Resolution: Not A Problem
      Assignee: Andrew Grieve

I think what's happening here is that the hook *is* being executed, but its output is hidden.
E.g. try a hook that writes to a file and see if the file is written without the -d flag.

Now, about the output being hidden - that sucks, and it's fixed on master already :)

> Hooks are not run unless -d flag is used
> ----------------------------------------
>
>                 Key: CB-6077
>                 URL: https://issues.apache.org/jira/browse/CB-6077
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.3.0
>         Environment: Xubuntu 13.10 x86_64, node=v0.10.25, npm=1.3.26, cordova=3.3.1-0.4.2
>            Reporter: Frederico Costa Galv√£o
>            Assignee: Andrew Grieve
>              Labels: cli, hooks
>
> Hooks aren't touched, and therefore aren't executed, if I run "cordova <action>"
without the "-d" flag.
> I've tested in a ultra simple scenario:
> {code:none}
> cordova create foo com.foo Foo
> cd foo/
> mkdir -p hooks/before_prepare
> echo -e '#!/bin/bash\necho "foo"' > hooks/before_prepare/echo.sh
> chmod +x hooks/before_prepare/echo.sh
> cordova platform add android
> {code}
> From then on, I run
> {code:none}
> ./hooks/before_prepare/echo.sh
> {code}
> to make sure the script works, and it really does.
> Now, none of ["cordova prepare", "cordova build", "cordova run"] causes the *echo* hook
to be executed. However, if I specify the verbose flag *-d* to any of those, the hook is finally
executed.
> A couple of weeks ago, max, I was making tests the same way I'm doing now with cordova,
and I kinda remember that it somehow worked as expected, although I don't remember any changes
in my environment such as node, npm, or cordova version that could've changed something like
this.
> The output from *cordova prepare* follows:
> {quote}
> Generating config.xml from defaults for platform "android"
> Preparing android project
> {quote}
> The output from *cordova -d prepare* follows:
> {quote}
> Executing hook ""<localpath>/foo/hooks/before_prepare/echo.sh" "<localpath>/foo""
> foo
>  
> cordova library for "android" already exists. No need to download. Continuing.
> Generating config.xml from defaults for platform "android"
> Calling plugman.prepare for platform "android"
> Preparing android project
> Processing configuration changes for plugins.
> Iterating over installed plugins: []
> Writing out cordova_plugins.js...
> Wrote out Android application name to "Foo"
> Wrote out Android package name to "com.foo"
> {quote}
> PS: At first I wish I could've found this before you had released 3.4, but I'm happy
that the cli have a independent release cycle now!



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message