Skip to content

Commit e87e659

Browse files
committed
Add postinstall script to delete any existing binary
1 parent 9e0de98 commit e87e659

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

npm-app/release-legacy/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"cb": "index.js"
99
},
1010
"scripts": {
11+
"postinstall": "node -e \"const fs = require('fs'); const path = require('path'); const os = require('os'); const binaryPath = path.join(os.homedir(), '.config', 'manicode', process.platform === 'win32' ? 'codebuff.exe' : 'codebuff'); try { fs.unlinkSync(binaryPath) } catch (e) { /* ignore if file doesn't exist */ }\"",
1112
"preuninstall": "node -e \"const fs = require('fs'); const path = require('path'); const os = require('os'); const binaryPath = path.join(os.homedir(), '.config', 'manicode', process.platform === 'win32' ? 'codebuff.exe' : 'codebuff'); try { fs.unlinkSync(binaryPath) } catch (e) { /* ignore if file doesn't exist */ }\""
1213
},
1314
"files": [

0 commit comments

Comments
 (0)