Skip to content

Commit

Permalink
write if statement as a if modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
annaborn committed Mar 8, 2024
1 parent dde6f6b commit 9d49c96
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/autoproj/git_server_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ def self.git_server_configuration(name, base_url,
end

Autoproj.add_source_handler name.downcase do |url, private: false, **vcs_options|
if add_suffix && url !~ /\.git$/
url += ".git"
end
url += ".git" if add_suffix && url !~ /\.git$/
url = "/#{url}" if url !~ /^\//

unless GIT_SERVER_CONFIG_VARS.all? { |v| config.has_value_for?("#{name}#{v}") }
Expand Down

0 comments on commit 9d49c96

Please sign in to comment.