Skip to content

Commit

Permalink
fix(release): handle execa pipe case
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Mar 14, 2019
1 parent a5a8b55 commit b7b8006
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions packages/foo/release-testing-package-first/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# @antongolub/release-testing-package-first

Test 3
19 changes: 12 additions & 7 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ const execa = require('execa')
const hook = require('require-in-the-middle')
const { sync, stdout, stderr, shell, shellSync } = execa

const _execa = (...args) => new Promise((resolve, reject) => {
try {
resolve(sync(...args))
} catch (e) {
reject(e)
}
})
const _execa = (...args) => {
const result = new Promise((resolve, reject) => {
try {
resolve(sync(...args))
} catch (e) {
reject(e)
}
})

result.stdout.pipe = () => {}
result.stderr.pipe = () => {}
}


Object.assign(_execa, execa)
Expand Down

0 comments on commit b7b8006

Please sign in to comment.