NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.04k stars 195 forks source link

fix: hooks not being called #5729

Closed rigor789 closed 1 year ago

rigor789 commented 1 year ago

closes https://github.com/NativeScript/nativescript-app-templates/pull/227

PR Checklist

What is the current behavior?

The hooks service is initialized and caches the hooksDirectories, however in some cases this might be an empty array (ie. when creating a new project, and the service is initialized before the project files exist yet).

What is the new behavior?

We only cache when there's items in the hooksDirectories (since this means the projectDir was defined)

Fixes/Implements/Closes #[Issue Number].