Skip to content

Commit

Permalink
Working retire.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mkonda committed Dec 29, 2015
1 parent 7ec60b1 commit 3bd252a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/pipeline/tasks/retirejs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,15 @@ def initialize(trigger, tracker)
end

def run
# Pipeline.notify "#{@name}"
rootpath = @trigger.path
# runsystem() doesn't work with redirected stderr
#@result=runsystem(true, "retire", "-c", "--outputformat", "json", "--path", "#{rootpath}", "2>&1")
Pipeline.debug "Retire rootpath: #{rootpath}"
Dir.chdir("#{rootpath}") do
@result = `npm install`
Pipeline.debug "npm install result: #{@result}"
@result = `npm install` # Need this even though it is slow to get full dependency analysis.
end
@result = `retire -c --outputformat json --path #{rootpath} 2>&1`
end

def analyze
puts @result
begin
vulnerabilities = parse_retire_json(JSON.parse(@result))

Expand Down

0 comments on commit 3bd252a

Please sign in to comment.