summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-10-16 23:28:02 -0700
committerTim Smith <tsmith84@gmail.com>2021-10-16 23:28:02 -0700
commitf203d9eb67d2490962cac140f59c9c3d5163959a (patch)
tree18c671eb8c170238eff00977d599be91bc539978
parent32a53fe16be55d8dc2ea483322aa215ed9531494 (diff)
downloadmixlib-shellout-typos.tar.gz
Fix comment typostypos
Fix some typos Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/mixlib/shellout/unix.rb2
-rw-r--r--lib/mixlib/shellout/windows.rb10
-rw-r--r--spec/mixlib/shellout_spec.rb2
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/mixlib/shellout/unix.rb b/lib/mixlib/shellout/unix.rb
index c278c32..eaa5d08 100644
--- a/lib/mixlib/shellout/unix.rb
+++ b/lib/mixlib/shellout/unix.rb
@@ -120,7 +120,7 @@ module Mixlib
unless ready_buffers
@execution_time += READ_WAIT_TIME
if @execution_time >= timeout && !@result
- # kill the bad proccess
+ # kill the bad process
reap_errant_child
# read anything it wrote when we killed it
attempt_buffer_read
diff --git a/lib/mixlib/shellout/windows.rb b/lib/mixlib/shellout/windows.rb
index 4c68667..a757e92 100644
--- a/lib/mixlib/shellout/windows.rb
+++ b/lib/mixlib/shellout/windows.rb
@@ -204,11 +204,11 @@ module Mixlib
#
# 1. strings with whitespace or quotes in them need quotes around them.
# 2. interior quotes need to get backslash escaped (parser needs to know when it really ends).
- # 3. random backlsashes in paths themselves remain untouched.
+ # 3. random backslashes in paths themselves remain untouched.
# 4. if the argument must be quoted by #1 and terminates in a sequence of backslashes then all the backlashes must themselves
- # be backslash excaped (double the backslashes).
+ # be backslash escaped (double the backslashes).
# 5. if an interior quote that must be escaped by #2 has a sequence of backslashes before it then all the backslashes must
- # themselves be backslash excaped along with the backslash escape of the interior quote (double plus one backslashes).
+ # themselves be backslash escaped along with the backslash escape of the interior quote (double plus one backslashes).
#
# And to restate. We are constructing a string which will be parsed by the windows parser into arguments, and we want those
# arguments to match the *args array we are passed here. So call the windows parser operation A then we need to apply A^-1 to
@@ -219,7 +219,7 @@ module Mixlib
# get the number of backslashes to insert. Then if it is even the double quotes terminate the argument. If it is even the
# double quotes are interior double quotes (the extra backslash quotes the double quote).
#
- # We construct the inverse operation so interior double quotes preceeded by N backslashes get 2N+1 backslashes in front of the quote,
+ # We construct the inverse operation so interior double quotes preceded by N backslashes get 2N+1 backslashes in front of the quote,
# while trailing N backslashes get 2N backslashes in front of the quote that terminates the argument.
#
# see: https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
@@ -232,7 +232,7 @@ module Mixlib
args.map do |arg|
if arg =~ /[ \t\n\v"]/
- arg = arg.gsub(/(\\*)"/, '\1\1\"') # interior quotes with N preceeding backslashes need 2N+1 backslashes
+ arg = arg.gsub(/(\\*)"/, '\1\1\"') # interior quotes with N preceding backslashes need 2N+1 backslashes
arg = arg.sub(/(\\+)$/, '\1\1') # trailing N backslashes need to become 2N backslashes
"\"#{arg}\""
else
diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb
index dce47dd..8a02bd2 100644
--- a/spec/mixlib/shellout_spec.rb
+++ b/spec/mixlib/shellout_spec.rb
@@ -480,7 +480,7 @@ describe Mixlib::ShellOut do
context "when setting environments with symbols" do
let(:options) { { environment: { SYMBOL: "cymbal" } } }
- it "should also set the enviroment" do
+ it "should also set the environment" do
expect(shell_cmd.environment).to eql({ "SYMBOL" => "cymbal" })
end
end