mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-26 04:10:36 +08:00 
			
		
		
		
	[Fix] sh lacks -O; thanks shellcheck
				
					
				
			This commit is contained in:
		
							
								
								
									
										3
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -2985,7 +2985,8 @@ nvm_check_file_permissions() { | ||||
|       if [ ! -L "${FILE}" ] && ! nvm_check_file_permissions "${FILE}"; then | ||||
|         return 2 | ||||
|       fi | ||||
|     elif [ -e "$FILE" ] && [ ! -w "$FILE" ] && [ ! -O "$FILE" ]; then | ||||
|     elif [ -e "$FILE" ] && [ ! -w "$FILE" ] && [ -z "$(command find "${FILE}" -prune -user "$(command id -u)")" ]; then | ||||
|       # ^ file ownership check from https://www.shellcheck.net/wiki/SC3067 | ||||
|       nvm_err "file is not writable or self-owned: $(nvm_sanitize_path "$FILE")" | ||||
|       return 1 | ||||
|     fi | ||||
|   | ||||
		Reference in New Issue
	
	Block a user