Skip to content

Commit c16589b

Browse files
committed
better update
1 parent 433f379 commit c16589b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/commands/wrapper/index.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,7 @@ function setupCommand (name, description, argv, importMeta) {
5252

5353
if (argv[0] === '--postinstall') {
5454
// Check if the wrapper is already enabled before showing the postinstall prompt
55-
let socketWrapperEnabled
56-
if (fs.existsSync(BASH_FILE)) {
57-
socketWrapperEnabled = checkSocketWrapperAlreadySetup(BASH_FILE)
58-
}
59-
if (fs.existsSync(ZSH_BASH_FILE)) {
60-
socketWrapperEnabled = checkSocketWrapperAlreadySetup(ZSH_BASH_FILE)
61-
}
55+
const socketWrapperEnabled = (fs.existsSync(BASH_FILE) && checkSocketWrapperAlreadySetup(BASH_FILE)) || (fs.existsSync(ZSH_BASH_FILE) && checkSocketWrapperAlreadySetup(ZSH_BASH_FILE))
6256

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

0 commit comments

Comments
 (0)