Skip to content

Commit

Permalink
fix the condition of deleting existing symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
ozantepe committed Feb 7, 2024
1 parent 2e04de1 commit 8ada9e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def self.auto_symlink_lldb(destination_path)

def self.delete_existing_lldb_symlinks(destination_path)
symlink_path = make_symlink_path_name(destination_path)
if path_exists?(symlink_path) and File.symlink?(symlink_path)
if File.symlink?(symlink_path)
UI.message "Deleting existing LLDB symlink: #{symlink_path}"
FileUtils.rm(symlink_path)
else
Expand Down
2 changes: 1 addition & 1 deletion spec/dynatrace_action_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def mock_dict (

def lldb_symlink_exists?(destination_path)
symlink = File.join(destination_path, "LLDB.framework")
return File.exist?(symlink) && File.symlink?(symlink)
return File.symlink?(symlink)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/dynatrace_symlink_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,6 @@

def lldb_symlink_exists?(destination_path)
symlink = File.join(destination_path, "LLDB.framework")
return File.exist?(symlink) && File.symlink?(symlink)
return File.symlink?(symlink)
end
end

0 comments on commit 8ada9e4

Please sign in to comment.