summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-06-06 15:10:43 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-06-06 15:10:43 -0700
commit9b36f2431b3b3bd86e9801556815b150baa9f4d2 (patch)
treeac9bb613a66f66f6e0fd21bb95c6b2c1c2b83328 /Rakefile
parent35f1d3636974838cd623c65f18b861fa2d16b777 (diff)
downloadmixlib-shellout-9b36f2431b3b3bd86e9801556815b150baa9f4d2.tar.gz
Support array args on windowslcg/win-array-args
Implements correct quoting and escaping of arguments on windows. That means that this works right now: ```ruby filename = "c:\program files" shell_out("dir", filename); ``` So all the defensive coding around quotes-around-filepaths -- which were all actually buggy even when they worked (trailing backslashes would fail) -- are unnecessary and arguments can just be passed in as an array and this code will sort it out. We rely on the existing determination of if metacharacters mean it needs to run under cmd and if it needs the ^ quoting which seems to be well tested, and which all runs after this does. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index dd326ab..40ab182 100644
--- a/Rakefile
+++ b/Rakefile
@@ -3,7 +3,7 @@ require "rspec/core/rake_task"
Bundler::GemHelper.install_tasks name: "mixlib-shellout"
-task default: [:style, :spec]
+task default: [:spec, :style]
desc "Run specs"
RSpec::Core::RakeTask.new(:spec) do |spec|