Skip to content

Commit

Permalink
fix: rename dir 🌸
Browse files Browse the repository at this point in the history
  • Loading branch information
fz6m committed Nov 10, 2023
1 parent c840c37 commit 5aa55f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xn-sakina/vary",
"version": "1.3.3",
"version": "1.3.4",
"description": "Changesets command shortcut sets",
"keywords": [
"changesets",
Expand Down
13 changes: 9 additions & 4 deletions src/helpers/napi/postinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,16 @@ const validateBinary = async () => {
)

const installedBinPath = path.join(installDir, 'node_modules', wasmName)
// INIT_CWD is injected via npm. If it doesn't exists, can't proceed.
fs.renameSync(
installedBinPath,
path.resolve(process.env.INIT_CWD!, 'node_modules', wasmName),
const targetPath = path.resolve(
process.env.INIT_CWD!,
'node_modules',
wasmName,
)
if (!fs.existsSync(targetPath)) {
fs.mkdirSync(targetPath, { recursive: true })
}
// INIT_CWD is injected via npm. If it doesn't exists, can't proceed.
fs.renameSync(installedBinPath, targetPath)
} catch (error) {
console.error(error)

Expand Down

0 comments on commit 5aa55f2

Please sign in to comment.