diff --git a/src/postinstall.js b/src/postinstall.js index 0899a56a..990ce970 100644 --- a/src/postinstall.js +++ b/src/postinstall.js @@ -3,7 +3,11 @@ const fs = require('node:fs'); const path = require('node:path'); -fs.rmSync(path.join('node_modules', '@github', 'keytar', 'build'), { +const keytarDir = path.dirname( + require.resolve('@github/keytar/package.json') +); + +fs.rmSync(path.join(keytarDir, 'build'), { recursive: true, force: true, });