From 6a46b1e3f31fea050560a0aa36b640fc76442931 Mon Sep 17 00:00:00 2001 From: Omer Demirok Date: Thu, 18 Jun 2020 15:07:40 +0100 Subject: [PATCH] Remove left-over folder created at `rake lint` task `rake lint` runs `inspec vendor` command before syntax check and this creates a `vendor` folder with the dependencies in it. A second `rake lint` task detects the style issues in the `vendor` file and fails the `lint` task. It should be removed after syntax check. Signed-off-by: Omer Demirok --- Rakefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 94e7d56a7..10617d413 100644 --- a/Rakefile +++ b/Rakefile @@ -53,9 +53,9 @@ namespace :syntax do desc 'InSpec syntax check' task :inspec do puts '-> Checking Inspec Control Syntax' - stdout, status = Open3.capture2("./bin/inspec vendor #{INTEGRATION_DIR} --overwrite && - ./bin/inspec check #{INTEGRATION_DIR} && - ./bin/inspec check .") + stdout, status = Open3.capture2("bundle exec inspec vendor #{INTEGRATION_DIR} --overwrite && + bundle exec inspec check #{INTEGRATION_DIR} && + bundle exec inspec check . && rm -rf #{INTEGRATION_DIR}/vendor") puts stdout %w{errors}.each do |type|