cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederico Costa Galvão (JIRA) <>
Subject [jira] [Commented] (CB-6077) Hooks are not run unless -d flag is used
Date Thu, 20 Feb 2014 21:47:20 GMT


Frederico Costa Galvão commented on CB-6077:

I can confirm that it executes the hooks alright, as expected. Only the output is being omitted
(both the output from the hook itself, and the output line that hints that the hook is being
executed). If those output improvements were already done, then this issue is really closed.

> Hooks are not run unless -d flag is used
> ----------------------------------------
>                 Key: CB-6077
>                 URL:
>             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 Foo
> cd foo/
> mkdir -p hooks/before_prepare
> echo -e '#!/bin/bash\necho "foo"' > hooks/before_prepare/
> chmod +x hooks/before_prepare/
> cordova platform add android
> {code}
> From then on, I run
> {code:none}
> ./hooks/before_prepare/
> {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
> 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
> 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/" "<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 ""
> {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

View raw message