mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-05-11 18:09:50 +08:00
fix script error(module is not imported correctly) in Patch pnpm step
This commit is contained in:
3
.github/workflows/release-ui.yml
vendored
3
.github/workflows/release-ui.yml
vendored
@@ -30,7 +30,8 @@ jobs:
|
||||
// https://github.com/pnpm/pnpm/issues/5638
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const npmGlobalModuleFolder = child_process.execSync('npm root -g').toString().trim()
|
||||
const childProcess = require('child_process')
|
||||
const npmGlobalModuleFolder = childProcess.execSync('npm root -g').toString().trim()
|
||||
const pnpmCjsFilePath = path.join(npmGlobalModuleFolder, 'pnpm/bin/pnpm.cjs')
|
||||
let pnpmCjsFileContent = fs.readFileSync(pnpmCjsFilePath).toString().replace(/^(#!\/usr\/bin\/env node)/, '#!node')
|
||||
fs.writeFileSync(pnpmCjsFilePath, pnpmCjsFileContent)
|
||||
|
||||
Reference in New Issue
Block a user