mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
Merge pull request #4159 from inspec/zenspider/windows_fixes
Windows fixes
This commit is contained in:
commit
6898319086
2 changed files with 5 additions and 1 deletions
|
@ -6,6 +6,8 @@ require 'fileutils'
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
require 'tmpdir'
|
require 'tmpdir'
|
||||||
|
|
||||||
|
ENV["CHEF_LICENSE"] = "accept-no-persist"
|
||||||
|
|
||||||
require 'minitest/hell'
|
require 'minitest/hell'
|
||||||
class Minitest::Test
|
class Minitest::Test
|
||||||
parallelize_me!
|
parallelize_me!
|
||||||
|
@ -125,7 +127,7 @@ module FunctionalHelper
|
||||||
|
|
||||||
def inspec(commandline, prefix = nil)
|
def inspec(commandline, prefix = nil)
|
||||||
if is_windows?
|
if is_windows?
|
||||||
invocation = "cmd /C \"#{prefix} bundle exec ruby #{exec_inspec} #{commandline}\""
|
invocation = "powershell -NonInteractive -Command \"#{prefix} bundle exec #{exec_inspec} #{commandline}\""
|
||||||
result = CMD.run_command(invocation)
|
result = CMD.run_command(invocation)
|
||||||
result.stdout.encode!(universal_newline: true)
|
result.stdout.encode!(universal_newline: true)
|
||||||
result.stderr.encode!(universal_newline: true)
|
result.stderr.encode!(universal_newline: true)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
Encoding.default_external = Encoding::UTF_8
|
||||||
|
|
||||||
require 'minitest/autorun'
|
require 'minitest/autorun'
|
||||||
require 'inspec/ui'
|
require 'inspec/ui'
|
||||||
require 'inspec/base_cli'
|
require 'inspec/base_cli'
|
||||||
|
|
Loading…
Reference in a new issue