From 01e9ec9a9f723b2ef89c7adfaea39f9e4db9aede Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 24 Sep 2017 19:24:46 +0100 Subject: Rubocop: automatic rule fixes. --- Library/Homebrew/cmd/unlinkapps.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/unlinkapps.rb b/Library/Homebrew/cmd/unlinkapps.rb index 7cae97e27..56dba3603 100644 --- a/Library/Homebrew/cmd/unlinkapps.rb +++ b/Library/Homebrew/cmd/unlinkapps.rb @@ -77,7 +77,7 @@ module Homebrew def unlinkapps_unlink?(target_app, opts = {}) # Skip non-symlinks and symlinks that don't point into the Homebrew prefix. app = target_app.readlink.to_s if target_app.symlink? - return false unless app && app.start_with?(*UNLINKAPPS_PREFIXES) + return false unless app&.start_with?(*UNLINKAPPS_PREFIXES) if opts.fetch(:prune, false) !File.exist?(app) # Remove only broken symlinks in prune mode. -- cgit v1.2.3