Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gulp always runs "default" task

Tags:

gulp

I have a simple gulpfile.js file with the next content:

var gulp = require("gulp");

gulp.task("test", []);
gulp.task("default", []);

But when I try to run "test" task with command gulp test it always runs only the "default" task. If I remove the "default" task it says Task default is not in your gulpfile

How can I run my custom task from the console?

like image 262
Fadil Mamedov Avatar asked Dec 11 '25 13:12

Fadil Mamedov


1 Answers

Ok, I have realized what was the problem. Windows command line doesn't see additional command line arguments, which I passed to the gulp. To resolve this problem we need to go to the registry and fix HKEY_CLASSES_ROOT\Applications\node.exe\shell\open\command key.

Originally the value was C:\Program Files (x86)\nodejs\node.exe" "%1". We need to add the %* symbols to the end of the string. Thus, our key value should look like this:

"C:\Program Files (x86)\nodejs\node.exe" "%1" %*
like image 173
Fadil Mamedov Avatar answered Dec 16 '25 18:12

Fadil Mamedov