Skip to content

Hook failures treated as bad user input #1268

@hdeshev

Description

@hdeshev

A failing hook correctly fails the build (tns prepare, tns run, etc), but that case gets treated as a user input error and the user sees the help page containing command invocation details and parameter lists.

This is mostly a problem with the typescript compile hook since the tns run help page is pretty big and pushes the compile errors reported by the compiler off the screen.

Executing before-prepare hook from /home/local/TELERIK/hdeshev/w/template-hello-world-ng/hooks/before-prepare/20-nativescript-dev-typescript.js
Found peer TypeScript 1.6.2
/home/local/TELERIK/hdeshev/w/template-hello-world-ng/app/app.ts(6,1): error TS2304: Cannot find name 'kuuuuuuuuuuuuuuu__'.
TypeScript compiler failed with exit code 1
# prepare
┌─────────┬───────────────────────┐
│ Usage   │ Synopsis              │
│ General │ $ tns prepare android │
└─────────┴───────────────────────┘

Copies common and relevant platform-specific content from the app directory to the subdirectory for the selected target platform
in the platforms directory. This lets you build the project with the SDK for the selected platform. 

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions