Skip to content

Commit

Permalink
simplify branch_or_tag logic
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-fernandez committed Oct 5, 2021
1 parent efe5611 commit a6d56bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datadog/ci/ext/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def extract_local_git

def branch_or_tag(branch_or_tag)
branch = tag = nil
if !branch_or_tag.nil? && branch_or_tag.include?('tags/')
if branch_or_tag && branch_or_tag.include?('tags/')
tag = branch_or_tag
else
branch = branch_or_tag
Expand Down

0 comments on commit a6d56bf

Please sign in to comment.