[ 
https://issues.apache.org/jira/browse/CB-9297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14725309#comment-14725309
 ] 

Patrick Mueller commented on CB-9297:
-------------------------------------

OK, so I think I figured out the cordova hooks thing (neat!).  In my default 
project (hello sample), I added two hooks, for {{before_build}} and 
{{after_build}}:

{noformat}
$ cat hooks/before_build/log.js
#!/usr/bin/env node

console.log('---------------------------------------------------- before build')

$ cat hooks/after_build/log.js
#!/usr/bin/env node

console.log('----------------------------------------------------- after build')
{noformat}

When I do a {{cordova build}}, I see the following output bracket the output of 
the build:

{noformat}
Running command: /Users/pmuellr/tmp/hello/hooks/before_build/log.js 
/Users/pmuellr/tmp/hello
---------------------------------------------------- before build
Running command: /Users/pmuellr/tmp/hello/platforms/ios/cordova/build

... many lines elided ...

** BUILD SUCCEEDED **
Running command: /Users/pmuellr/tmp/hello/hooks/after_build/log.js 
/Users/pmuellr/tmp/hello
----------------------------------------------------- after build
{noformat}

Works fine for me on Mac Yosemite, with io.js 2.4.0 and 3.2.0, cordova 5.2.0

Was it some code in your hook that caused the reference line in {{platform.js}} 
to be executed? Could you provide an example.

> Cordova CLI fails silently with iojs
> ------------------------------------
>
>                 Key: CB-9297
>                 URL: https://issues.apache.org/jira/browse/CB-9297
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 5.1.2
>         Environment: Cordova CLI: 5.1.1 (this isn't in your version list 
> above)
> ios-deploy version: 1.7.0 
> ios-sim version: 4.1.1 
> OS: Mac OS X Yosemite
> Xcode version: Xcode 6.4 Build version 6E35b 
> node (iojs): 1.8.1
>            Reporter: Robert Churchill
>
> Running most build tasks (emulate, run, build) for ios when node is replaced 
> by iojs results in the build failing silently. Example:
> $ cordova build ios
> $
> $ cordova build ios --verbose
> Generating config.xml from defaults for platform "ios"
> Calling plugman.prepare for platform "ios"
> Preparing ios project
> ...
> [seems to finish prepare (but without executing hooks) then exits]
> ...
> $
> Not sure if you plan to support iojs, but at least this report might help 
> someone googling. Unfamiliar with the Apache JIRA system so apologies if this 
> report is in the wrong place etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to