Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
charliegerard committed Jan 19, 2024
1 parent 47047ab commit 433f379
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/commands/wrapper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ function setupCommand (name, description, argv, importMeta) {

if (argv[0] === '--postinstall') {
// Check if the wrapper is already enabled before showing the postinstall prompt
const socketWrapperEnabled = (fs.existsSync(BASH_FILE) && checkSocketWrapperAlreadySetup(BASH_FILE)) || (fs.existsSync(ZSH_BASH_FILE) && checkSocketWrapperAlreadySetup(BASH_FILE))
let socketWrapperEnabled
if (fs.existsSync(BASH_FILE)) {
socketWrapperEnabled = checkSocketWrapperAlreadySetup(BASH_FILE)
}
if (fs.existsSync(ZSH_BASH_FILE)) {
socketWrapperEnabled = checkSocketWrapperAlreadySetup(ZSH_BASH_FILE)
}

if (!socketWrapperEnabled) {
installSafeNpm(`The Socket CLI is now successfully installed! 🎉
Expand Down

0 comments on commit 433f379

Please sign in to comment.