diff --git a/lib/commands/wrapper/index.js b/lib/commands/wrapper/index.js index 63d5105e..219f0612 100644 --- a/lib/commands/wrapper/index.js +++ b/lib/commands/wrapper/index.js @@ -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! 🎉