{"action":"created","issue":{"url":"https://api.github.com/repos/gulpjs/gulp/issues/1019","labels_url":"https://api.github.com/repos/gulpjs/gulp/issues/1019/labels{/name}","comments_url":"https://api.github.com/repos/gulpjs/gulp/issues/1019/comments","events_url":"https://api.github.com/repos/gulpjs/gulp/issues/1019/events","html_url":"https://github.com/gulpjs/gulp/issues/1019","id":68470165,"number":1019,"title":"Silent failure in 4.0 branch when merging streams with distinct destinations","user":{"login":"epong","id":2954259,"avatar_url":"https://avatars.githubusercontent.com/u/2954259?v=3","gravatar_id":"","url":"https://api.github.com/users/epong","html_url":"https://github.com/epong","followers_url":"https://api.github.com/users/epong/followers","following_url":"https://api.github.com/users/epong/following{/other_user}","gists_url":"https://api.github.com/users/epong/gists{/gist_id}","starred_url":"https://api.github.com/users/epong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epong/subscriptions","organizations_url":"https://api.github.com/users/epong/orgs","repos_url":"https://api.github.com/users/epong/repos","events_url":"https://api.github.com/users/epong/events{/privacy}","received_events_url":"https://api.github.com/users/epong/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-14T19:03:17Z","updated_at":"2015-04-14T19:26:00Z","closed_at":"2015-04-14T19:26:00Z","body":"Hi. In the 4.0 branch, I'm having trouble merging two streams that are distinctly piped to destinations. Consider this gulpfile:\r\n\r\n```javascript\r\nvar gulp = require('gulp');\r\nvar es = require('event-stream');\r\n\r\nfunction test() {\r\n  var stream1 = gulp.src('./file1')\r\n        .pipe(gulp.dest('./dist/foo'));\r\n  var stream2 = gulp.src('./file2')\r\n        .pipe(gulp.dest('./dist/bar'));\r\n\r\n  return es.merge(stream1, stream2);\r\n}\r\n\r\ngulp.task('default', test);\r\n```\r\n\r\nRunning `gulp` gets me:\r\n\r\n```\r\n[14:31:15] Using gulpfile ~/src/gulp-test/gulpfile.js\r\n[14:31:15] Starting 'default'...\r\n```\r\n\r\nAnd exits. The return code is 0, and nothing seems to show up with node-inspector. The files actually get copied:\r\n\r\n```\r\ndist\r\n├── bar\r\n│   └── file2\r\n└── foo\r\n    └── file1\r\n```\r\n\r\nBut the task fails, and gulp quits; if I chain another task in series, it doesn't run. If I remove the destinations and pipe the merged stream to a common destination, the task succeeds.\r\n\r\nI think better error management is being addressed [elsewhere](https://github.com/gulpjs/gulp/issues/359), so this issue is just about clarifying or addressing the behavior of these merged streams.\r\n\r\nNot sure if I've fundamentally misunderstood how these streams behave, but [this recipe](https://github.com/gulpjs/gulp/blob/4.0/docs/recipes/using-multiple-sources-in-one-task.md) expresses the behavior I'm trying to achieve."},"comment":{"url":"https://api.github.com/repos/gulpjs/gulp/issues/comments/93028258","html_url":"https://github.com/gulpjs/gulp/issues/1019#issuecomment-93028258","issue_url":"https://api.github.com/repos/gulpjs/gulp/issues/1019","id":93028258,"user":{"login":"phated","id":992373,"avatar_url":"https://avatars.githubusercontent.com/u/992373?v=3","gravatar_id":"","url":"https://api.github.com/users/phated","html_url":"https://github.com/phated","followers_url":"https://api.github.com/users/phated/followers","following_url":"https://api.github.com/users/phated/following{/other_user}","gists_url":"https://api.github.com/users/phated/gists{/gist_id}","starred_url":"https://api.github.com/users/phated/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phated/subscriptions","organizations_url":"https://api.github.com/users/phated/orgs","repos_url":"https://api.github.com/users/phated/repos","events_url":"https://api.github.com/users/phated/events{/privacy}","received_events_url":"https://api.github.com/users/phated/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T19:26:00Z","updated_at":"2015-04-14T19:26:00Z","body":"EventStream is no longer supported because it is streams1, won't be updated and its `merge` method isn't a real stream.  The open ticket for this is https://github.com/phated/async-done/issues/19"}}