-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running task steps per folder fails if containing folder is empty. #2122
Running task steps per folder fails if containing folder is empty. #2122
Comments
I think it would be pretty obvious that you should put something in the folder you're processing, but I added a check for it in the example code in the commit above. You can just return if there are no folders to merge. |
@contra thats not correct and you didn't follow the conventional changelog style |
@phated What isn't correct about it? Did the way synchronous functions work change in undertaker? |
Sync functions are not supported. That's been in forever. |
@contra, That conditional didn't work. I still get errors that the task didn't complete. As for 'putting something in the folder I'm processing", I did mention that it's a sprite generator. It is possible SVGs haven't been made and added yet. Thank you both for answering. |
@cloudsociety Replace the return with |
I've rebased and cleaned up the result. |
I set up a similar task to the one described here: https://github.com/gulpjs/gulp/blob/master/docs/recipes/running-task-steps-per-folder.md
Instead of running JS or SCSS, it runs a sprite generator.
The issue is that if there're no folders returned from
getFolders()
, the task (and any sequenced/parallel tasks), fail. Without subfolders in the src path,.map
won't run... which means gulp scripts don't fire... leaving us with a null stream.Is there any way to return an "empty" stream if no folders are present or inform gulp that the task has run successfully in the same instance?
The text was updated successfully, but these errors were encountered: