Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 390dfb2

Browse files
committed
Look for config in json file
1 parent 951a0f6 commit 390dfb2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/csslint

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

44
require 'cc/engine/csslint'
55

6-
def parse_engine_config(raw)
7-
raw ? JSON.parse(raw) : {}
6+
if File.exists?("/config.json")
7+
engine_config = JSON.parse(File.read("/config.json"))
8+
else
9+
engine_config = {}
810
end
911

10-
engine_config = parse_engine_config(ENV['ENGINE_CONFIG'])
1112
CC::Engine::CSSlint.new(
1213
directory: "/code", engine_config: engine_config, io: STDOUT
1314
).run

0 commit comments

Comments
 (0)