Skip to content

Commit 9900631

Browse files
committed
feat: Use APPMAP=true to flag library loading
Repurpose APPMAP=true a bit, to support a use case like: gem 'appmap', require: ENV['APPMAP'] == 'true'
1 parent cf83f00 commit 9900631

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/appmap/detect_enabled.rb

+1-4
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ def enabled?
3333
if enabled
3434
warn AppMap::Util.color("AppMap #{@recording_method.nil? ? '' : "#{@recording_method} "}recording is enabled because #{message}", :magenta)
3535
# Inform the user that legacy APPMAP=true isn't required any more
36-
if enabled_by_env && ENV['APPMAP'] == 'true'
37-
warn AppMap::Util.color("Note: Setting envirnoment variable APPMAP=true is no longer necessary to enable #{@recording_method} recording in this environment.", :yellow)
38-
end
3936
end
4037
end
4138

@@ -82,7 +79,7 @@ def detect_app_env
8279
end
8380

8481
def globally_enabled?
85-
[ 'APPMAP=true', true ] if ENV['APPMAP'] == 'true'
82+
[ 'APPMAP=true', true ] if @recording_method.nil? && ['APPMAP'] == 'true'
8683
end
8784

8885
def globally_disabled?

0 commit comments

Comments
 (0)