From 9d49c9663903d234f4a369ab6c4e442e71ffb1f4 Mon Sep 17 00:00:00 2001 From: Anna Born Date: Fri, 8 Mar 2024 20:55:45 +0100 Subject: [PATCH] write if statement as a if modifier --- lib/autoproj/git_server_configuration.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/autoproj/git_server_configuration.rb b/lib/autoproj/git_server_configuration.rb index b0b63844..69ae4cce 100644 --- a/lib/autoproj/git_server_configuration.rb +++ b/lib/autoproj/git_server_configuration.rb @@ -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}") }