Skip to content

Commit

Permalink
Fix app env being reported as empty brackets (#1219)
Browse files Browse the repository at this point in the history
  • Loading branch information
tombruijn authored Jul 30, 2024
1 parent 53aa75d commit cf08125
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changesets/fix-env-being-reported-as-----.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
bump: patch
type: fix
---

Fix the application environment being reported as "[]" when no valid environment could be found.
2 changes: 2 additions & 0 deletions lib/appsignal/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def self.determine_env(initial_env = nil)
env = loader_defaults[:env]
return env if env
end

nil
end

# Determine which root path AppSignal should initialize with.
Expand Down
4 changes: 4 additions & 0 deletions spec/lib/appsignal/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ def on_load

expect(described_class.determine_env).to eq("loader_env2")
end

it "returns nil if no env was found" do
expect(described_class.determine_env).to be_nil
end
end
end

Expand Down

0 comments on commit cf08125

Please sign in to comment.