| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Obvious fix; these changes are the result of automation not creative thinking.
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Obvious fix; these changes are the result of automation not creative thinking.
|
|
|
|
| |
Obvious fix; these changes are the result of automation not creative thinking.
|
|
|
|
| |
Obvious fix; these changes are the result of automation not creative thinking.
|
|
|
|
| |
Obvious fix; these changes are the result of automation not creative thinking.
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Eric Vernier <zerikv@gmail.com>
|
|\
| |
| | |
Release 2.4.0
|
| |
| |
| |
| | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \
| |/
|/| |
Fix a bare rescue on Windows
|
| |
| |
| |
| | |
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
|
|/
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
|
|
|
|
|
|
| |
* Added username,password validation for elavated option
Signed-off-by: nimisha <nimisha.sharad@clogeny.com>
|
|
|
|
| |
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
|
|
|
|
|
|
| |
Missed one argument to this method call
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
|
|
|
|
| |
Signed-off-by: Bryan McLellan <btm@chef.io>
|
|
|
|
|
|
|
|
|
| |
Chef rescues Mixlib::ShellOut::ShellCommandFailed, SystemCallError in a few places.
Recent refactors caused EmptyWindowsCommand to be correctly raised where we still
unintentionally raised SystemCallError due to a bad FFI call. This gets us closer
to not needing to cover these edge cases in rescue clauses everywhere.
Signed-off-by: Bryan McLellan <btm@chef.io>
|
| |
|
|
|
|
|
|
|
| |
In some cases the user running mixlib-shellout needs additional privileges, in
other cases the user we're trying to run the process as needs them.
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
|
|
|
|
| |
Signed-off-by: NimishaS <nimisha.sharad@msystechnologies.com>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- mostly cleans up the windows specs so its easier to read the API
out of them and removes some of the very brittle internal testing
- refactors the 'which' logic a bit. trying to converge towards the
chef/chef version and eventually extracting common code so that
do not have to maintain 10+ slightly different copies everywhere.
- adds the Mixlib::ShellOut::EmptyWindowsCommand exception because
letting CreateProcessW throw a generic SystemCallError is pretty
much useless to everyone.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
| |
its just a collection of private methods, they should be private methods
retain a method in the class that was being used externally.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\
| |
| | |
Modified all exceptions to have a common parent
|
| |
| |
| |
| | |
Closes #98
|
| |
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
| |
by converting the hash keys to strings, we can use symbols in our
environment blocks:
environment {FOO: 'bar', SHELL: 'zsh'}
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|