Skip to content

Commit b18a1fd

Browse files
committed
Parse JSON config from file instead of environment
1 parent aaca365 commit b18a1fd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bin/bundler-audit

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), "../lib"))
44

55
require 'cc/engine/bundler_audit'
66

7-
def parse_engine_config(raw)
8-
raw ? JSON.parse(raw) : {}
7+
engine_config = {}
8+
9+
if File.exists?("/config.json")
10+
engine_config = JSON.parse(File.read("/config.json"))
911
end
10-
engine_config = parse_engine_config(ENV['ENGINE_CONFIG'])
12+
1113
CC::Engine::BundlerAudit.new(
1214
directory: "/code", engine_config: engine_config, io: STDOUT
1315
).run

0 commit comments

Comments
 (0)