d264b3990a3afc00899830c7a0ce39f3b47867ac

Author
Michael Aquilina <michaelaquilina@gmail.com>
Committer
Michael Aquilina <michaelaquilina@gmail.com>
Date

Message

Improved and more concise messaging

Diff

 1diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
 2index e3b0825f67e419a3e0c6fb87113781f36324ada1..ef6c880f54c3dc25f51e4f29a38a8f5093edfebe 100644
 3--- a/autoswitch_virtualenv.plugin.zsh
 4+++ b/autoswitch_virtualenv.plugin.zsh
 5@@ -31,15 +31,14 @@ function check_venv()
 6           file_permissions="$(stat -c %a .venv)"
 7 
 8           if [[ "$file_owner" != "$(id -u)" ]]; then
 9-            echo "AUTOSWITCH WARNING:"
10-            echo "Found a .venv file but it is not owned by the current user"
11-            echo "This will not be activated to prevent potentially malicious actions"
12+            echo "AUTOSWITCH WARNING: Virtualenv will not be activated"
13+            echo ""
14+            echo "Reason: Found a .venv file but it is not owned by the current user"
15             echo "Change ownership of .venv to '$USER' to fix this"
16           elif [[ "$file_permissions" != "600" ]]; then
17-            echo "AUTOSWITCH WARNING:"
18-            echo "Found a .venv file with weak permission settings ($file_permissions)."
19-            echo "This will not be activated to prevent potentially malicious actions"
20-            echo "This should be set to read-only for your user (600)"
21+            echo "AUTOSWITCH WARNING: Virtualenv will not be activated"
22+            echo ""
23+            echo "Reason: Found a .venv file with weak permission settings ($file_permissions)."
24             echo "Run the following command to fix this: \"chmod 600 .venv\""
25           else
26             SWITCH_TO="$(cat .venv)"