From 2622431e306b43e4506b45fd704888c455a48f25 Mon Sep 17 00:00:00 2001 From: merceyz Date: Mon, 7 Jun 2021 21:33:22 +0200 Subject: [PATCH] fix: spawn `jscodeshift` cli using node --- bin/cli.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cli.js b/bin/cli.js index 6640b37..b34fc41 100644 --- a/bin/cli.js +++ b/bin/cli.js @@ -17,7 +17,7 @@ const chalk = require('chalk'); const isGitClean = require('is-git-clean'); const transformerDirectory = path.join(__dirname, '../', 'transforms'); -const jscodeshiftExecutable = require.resolve('.bin/jscodeshift'); +const jscodeshiftExecutable = require.resolve('jscodeshift/bin/jscodeshift.js'); function checkGitStatus(force) { let clean = false; @@ -113,7 +113,7 @@ function runTransform({ files, flags, parser, transformer, answers }) { console.log(`Executing command: jscodeshift ${args.join(' ')}`); - const result = execa.sync(jscodeshiftExecutable, args, { + const result = execa.sync('node', [jscodeshiftExecutable, ...args], { stdio: 'inherit', stripEof: false });