Skip to content

Commit

Permalink
[DONOTMERGE] Disable permissions check for venv file
Browse files Browse the repository at this point in the history
Triggers repeatedly when using the plugin in conjunction with poetry (see [0]).

[0]: MichaelAquilina#163
moha-gh committed Aug 8, 2024
1 parent 40a0e85 commit 0c24fdb
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions autoswitch_virtualenv.plugin.zsh
Original file line number Diff line number Diff line change
@@ -184,10 +184,6 @@ function check_venv()
printf "AUTOSWITCH WARNING: Virtualenv will not be activated\n\n"
printf "Reason: Found a $AUTOSWITCH_FILE file but it is not owned by the current user\n"
printf "Change ownership of ${AUTOSWITCH_PURPLE}$venv_path${AUTOSWITCH_NORMAL} to ${PURPLE}'$USER'${NORMAL} to fix this\n"
elif [[ -f "$venv_path" ]] && ! [[ "$file_permissions" =~ ^[64][04][04]$ ]]; then
printf "AUTOSWITCH WARNING: Virtualenv will not be activated\n\n"
printf "Reason: Found a $AUTOSWITCH_FILE file with weak permission settings ($file_permissions).\n"
printf "Run the following command to fix this: ${AUTOSWITCH_PURPLE}\"chmod 600 $venv_path\"${AUTOSWITCH_NORMAL}\n"
else
if [[ "$venv_path" == *"/Pipfile" ]]; then
if type "pipenv" > /dev/null && _activate_pipenv; then

0 comments on commit 0c24fdb

Please sign in to comment.