Skip to content

Commit acbc18b

Browse files
rosen-vladimirovrigor789
authored andcommitted
fix: correct --bundle option checking (nativescript-vue#455)
In case `--bundle` is not passed, the `before-checkForChanges` hook should stop the execution. However, in case `--bundle` is passed, it should allow the process to continue. Currently, even when `--bundle` is passed, the hook breaks the execution with error that you need to pass `--bundle`. The problem is that the hook checks the flag based on CLI's internal representation of the flag, but the internal structure has been changed since the PR that added this functionality has been added. Fix the hook to have correct check for bundle flag.
1 parent fe6f469 commit acbc18b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

platform/nativescript/hooks/before-checkForChanges.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
module.exports = function(hookArgs, $errors) {
22
const bundle =
33
hookArgs &&
4-
hookArgs.projectChangesOptions &&
5-
hookArgs.projectChangesOptions.bundle
4+
hookArgs.checkForChangesOpts &&
5+
hookArgs.checkForChangesOpts.projectChangesOptions &&
6+
hookArgs.checkForChangesOpts.projectChangesOptions.bundle
67
if (!bundle) {
78
$errors.failWithoutHelp(
89
"Nativescript-vue doesn't work without --bundle option. Please specify --bundle option to the command and execute it again."

0 commit comments

Comments
 (0)