gruntjs / gruntjs/grunt

non-file multi tasks crash with --verbose

Open
#1,341 10 comments 0 reactions 0 assignees View on GitHub
Type: Bug
Dominant language
JavaScript
Stars
12.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

When I register a multi task that isn't file based grunt crashes with --verbose.
--force doesn't help.

Using the example multitask from the doc:

```
grunt --verbose --stack --force log:baz
Initializing
Command-line options: --verbose, --stack, --force

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Initializing config...OK
Loading "Gruntfile.js" tasks...OK
+ log

Running tasks: log:baz

Running "log:baz" (log) task
Verifying property log.baz exists in config...OK
Warning: Object false has no method 'indexOf' Used --force, continuing.

Done, but with warnings.
```

Contributor guide

Open the contributing guide

Research direction

Start with the multitask example in Gruntfile.js and reproduce the failure using `grunt --verbose --stack --force log:baz`. Trace the verbose execution of the non-file multi task from the command output; done means the task completes without the `indexOf` crash or warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.