diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-06-06 15:10:43 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-06-06 15:10:43 -0700 |
commit | 9b36f2431b3b3bd86e9801556815b150baa9f4d2 (patch) | |
tree | ac9bb613a66f66f6e0fd21bb95c6b2c1c2b83328 /Rakefile | |
parent | 35f1d3636974838cd623c65f18b861fa2d16b777 (diff) | |
download | mixlib-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-- | Rakefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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| |