Commit 31c97b2

Anton Golub <mailbox@antongolub.ru>
2021-05-24 00:11:32
fix: make internal npx invocation compatible with npm v6 (#113)
ref https://omrilotan.medium.com/npx-breaking-on-ci-b9f3f61d4676
1 parent 1ab8c39
Changed files (1)
zx.mjs
@@ -117,7 +117,7 @@ async function importPath(filepath, origin = filepath) {
   if (ext === '.ts') {
     let {dir, name} = parse(filepath)
     let outFile = join(dir, name + '.mjs')
-    await run`npx --yes tsc --target esnext --module esnext --moduleResolution node ${filepath}`
+    await run`npm_config_yes=true npx tsc --target esnext --module esnext --moduleResolution node ${filepath}`
     await fs.rename(join(dir, name + '.js'), outFile)
     let wait = importPath(outFile, filepath)
     await fs.rm(outFile)