Skip to content

Commit 3899178

Browse files
committed
fix(smol): use python configure.py on Windows instead of ./configure
Windows doesn't recognize ./configure as an executable. On Windows, Node.js's configure script must be invoked via Python explicitly. Changes: - Detect platform with WIN32 constant - Windows: Run 'python configure.py <flags>' - Unix/Linux/macOS: Run './configure <flags>' (existing behavior) - Update log message to show correct command per platform This fixes Windows smol build failure: "'.' is not recognized as an internal or external command"
1 parent 40497fb commit 3899178

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/node-smol-builder/scripts/build.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,12 @@ async function main() {
14181418
configureFlags.unshift('--dest-cpu=x64')
14191419
}
14201420

1421-
logger.log('::group::Running ./configure')
1422-
await exec('./configure', configureFlags, { cwd: NODE_DIR })
1421+
// Windows uses configure.py directly, Unix uses ./configure wrapper script.
1422+
const configureCommand = WIN32 ? 'python' : './configure'
1423+
const configureArgs = WIN32 ? ['configure.py', ...configureFlags] : configureFlags
1424+
1425+
logger.log(`::group::Running ${WIN32 ? 'python configure.py' : './configure'}`)
1426+
await exec(configureCommand, configureArgs, { cwd: NODE_DIR })
14231427
logger.log('::endgroup::')
14241428
logger.log(`${colors.green('✓')} Configuration complete`)
14251429
logger.log('')

0 commit comments

Comments
 (0)