From 6d1012c307fdf0ec716fe232e784592f7990e3c8 Mon Sep 17 00:00:00 2001 From: Andrey Marchenko Date: Thu, 31 Aug 2023 15:16:40 +0200 Subject: [PATCH] enable ruby-2.1 mode for linting until we separate from dd-trace-rb --- .standard.yml | 4 +++- lib/datadog/ci/ext/environment.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.standard.yml b/.standard.yml index 2e2ba965..fd66eadf 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1,5 +1,7 @@ -ruby_version: 2.7 +ruby_version: 2.1 format: progress ignore: - 'gemfiles/**/*' + - 'tasks/**/*' + - 'yard/**/*' \ No newline at end of file diff --git a/lib/datadog/ci/ext/environment.rb b/lib/datadog/ci/ext/environment.rb index a27caebc..98ec37e8 100644 --- a/lib/datadog/ci/ext/environment.rb +++ b/lib/datadog/ci/ext/environment.rb @@ -557,7 +557,7 @@ def extract_local_git def branch_or_tag(branch_or_tag) branch = tag = nil - if branch_or_tag&.include?("tags/") + if branch_or_tag && branch_or_tag.include?("tags/") tag = branch_or_tag else branch = branch_or_tag