From ef6df989459caccfeb5ce8431d6f559385a30046 Mon Sep 17 00:00:00 2001 From: sumomo015 <138793740+sumomo015@users.noreply.github.com> Date: Wed, 24 Dec 2025 21:34:43 +0900 Subject: [PATCH 1/2] fix: resolve yarn postinstall failure by setting INIT_CWD for package manager detection --- npm/deepinstall.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/npm/deepinstall.js b/npm/deepinstall.js index 802d83863..67fd34844 100644 --- a/npm/deepinstall.js +++ b/npm/deepinstall.js @@ -7,7 +7,9 @@ var shell = require('shelljs'), command, getSubfolders, fs = require('fs'), - pwd = shell.pwd(); + pwd = shell.pwd(), + // eslint-disable-next-line no-process-env + initPwd = process.env.INIT_CWD; const args = process.argv, PATH_TO_CODEGENS_FOLDER = path.resolve(__dirname, '../codegens'); @@ -19,7 +21,7 @@ getSubfolders = (folder) => { async.series([ function (next) { - detect().then((res) => { + detect({ cwd: initPwd }).then((res) => { pm = res; console.log('Detected package manager: ' + pm); return next(); From d4831b98a99714a316e71288266726b78a24e5db Mon Sep 17 00:00:00 2001 From: sumomo015 <138793740+sumomo015@users.noreply.github.com> Date: Wed, 24 Dec 2025 21:58:56 +0900 Subject: [PATCH 2/2] chore: correct variable name from initPwd to initCwd --- npm/deepinstall.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm/deepinstall.js b/npm/deepinstall.js index 67fd34844..14c9cc748 100644 --- a/npm/deepinstall.js +++ b/npm/deepinstall.js @@ -9,7 +9,7 @@ var shell = require('shelljs'), fs = require('fs'), pwd = shell.pwd(), // eslint-disable-next-line no-process-env - initPwd = process.env.INIT_CWD; + initCwd = process.env.INIT_CWD; const args = process.argv, PATH_TO_CODEGENS_FOLDER = path.resolve(__dirname, '../codegens'); @@ -21,7 +21,7 @@ getSubfolders = (folder) => { async.series([ function (next) { - detect({ cwd: initPwd }).then((res) => { + detect({ cwd: initCwd }).then((res) => { pm = res; console.log('Detected package manager: ' + pm); return next();