Skip to content

Commit

Permalink
[Fix] allow uninstalls when files are nonwritable but self-owned.
Browse files Browse the repository at this point in the history
Fixes #1270.
  • Loading branch information
ljharb committed Nov 13, 2016
1 parent eab41ed commit e5316dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2090,8 +2090,8 @@ nvm_check_file_permissions() {
fi
return 2
fi
elif [ -e "$FILE" ] && [ ! -w "$FILE" ]; then
nvm_err "file is not writable: $(nvm_sanitize_path "$FILE")"
elif [ -e "$FILE" ] && [ ! -w "$FILE" ] && [ ! -O "$FILE" ]; then
nvm_err "file is not writable or self-owned: $(nvm_sanitize_path "$FILE")"
if [ "${ZSH_HAS_NONOMATCH_UNSET}" -eq 1 ] && nvm_has "setopt"; then
setopt nomatch
fi
Expand Down

0 comments on commit e5316dd

Please sign in to comment.