78fed64ba67c4fde149f772397dd8d0e6289850b

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

Message

Update AUTOSWITCH WARNING messages

Diff

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