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
  • Loading branch information
moha-gh committed Jan 14, 2025
1 parent 8a7b005 commit cddda9d
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
Expand Up @@ -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
Expand Down

0 comments on commit cddda9d

Please sign in to comment.