summaryrefslogtreecommitdiff
path: root/lib/mixlib/shellout
Commit message (Collapse)AuthorAgeFilesLines
* Remove copyright datesdatesTim Smith2020-11-123-4/+4
| | | | | | This is 100% just to force a new build since 3.2.0 was build off the master branch and not main, which caused some old code to ship. We need a 3.2.1 Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 3.2.0 by Chef ExpeditorChef Expeditor2020-11-121-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #224 from ↵Tim Smith2020-11-121-1/+99
|\ | | | | | | | | MsysTechnologiesllc/Kapil/MSYS-1131_Retrieves_the_environment_variables_for_the_specified_user Signed-off-by: Tim Smith <tsmith@chef.io>
| * Load a user's profile, before retrieves the environment variablesKapil Chouhan2020-11-031-0/+8
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
| * Added yard commentsKapil Chouhan2020-09-101-12/+30
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
| * Update lib/mixlib/shellout/windows/core_ext.rbTim Smith2020-09-091-1/+1
| |
| * Update lib/mixlib/shellout/windows/core_ext.rb Tim Smith2020-09-091-1/+1
| | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io> Co-authored-by: pete higgins <pete@peterhiggins.org>
| * Added Dependency of ffi-win31-extensions gem and added test casesKapil Chouhan2020-09-091-0/+1
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
| * Retrieves the environment variables for the specified userKapil Chouhan2020-09-032-3/+73
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
| * Fix for MSYS-1131 Retrieves the environment variables for the specified userKapil Chouhan2020-09-021-1/+2
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* | Bump version to 3.1.7 by Chef Expeditorv3.1.7Chef Expeditor2020-10-291-1/+1
| | | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | Bump version to 3.1.6 by Chef Expeditorv3.1.6Chef Expeditor2020-09-101-1/+1
| | | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | Merge pull request #221 from chef/safeTim Smith2020-09-093-19/+12
|\ \ | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Simplify things a bit with &.safeTim Smith2020-09-093-19/+12
| | | | | | | | | | | | | | | | | | Use the latest and greatest ruby-isms to cut down on some code. Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Bump version to 3.1.5 by Chef Expeditorv3.1.5Chef Expeditor2020-09-091-1/+1
|/ / | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | Stop doing weird things with STDOUTlcg/shellout-trace-loggingLamont Granquist2020-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means we get output when going to logfiles, while daemonized or when sending to pipes. Piping trace output to grep/less is why I consider the current behavior broken and this to be a bugfix. Since this is all debug/trace logging tweaking this should not be impacting anyone's running systems (https://xkcd.com/1172/). Under ideal conditions we should probably figure out some way to send output through the logger when trace is enabled and there's no STDOUT, but this is probably a VERY unlikely use case and is just not super easy. And daemonized trace logging of live stdout to a logfile will actually work correctly if someone is using something like systemd and just using STDOUT logging like it is the 21st century. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Drop the shell_out logging down to trace levelLamont Granquist2020-08-241-1/+1
|/ | | | | | | | | | | This has to have been an oversight when thom created the trace level, since live stdout logging produces a lot of output. We also need this for adding live stdout logging for ohai which produces a lot of output, where trace is certainly more appropriate and makes the debug level difficult to read. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Bump version to 3.1.4 by Chef Expeditorv3.1.4Chef Expeditor2020-08-131-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Optimize requires for non-omnibus installsrequiresTim Smith2020-08-121-1/+1
| | | | | | require is quite slow in Ruby and doing requires for things you've already required is also slow. We've used this simple hack in Chef to speed up our requires. In the omnibus installs we patch how rubygems works to make this somewhat pointless, but this will help non-omnibus installs Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 3.1.3 by Chef Expeditorv3.1.3Chef Expeditor2020-07-281-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Fix a few typosspellingTim Smith2020-07-282-2/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 3.1.2 by Chef Expeditorv3.1.2Chef Expeditor2020-07-231-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* convert helper to default_paths APIlcg/default-pathsLamont Granquist2020-07-221-3/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* update commentsLamont Granquist2020-07-181-35/+23
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Bump version to 3.1.1 by Chef Expeditorv3.1.1Chef Expeditor2020-07-171-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 3.1.0 by Chef Expeditorv3.1.0Chef Expeditor2020-07-171-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 3.0.16 by Chef Expeditorv3.0.16Chef Expeditor2020-07-161-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 3.0.15 by Chef Expeditorv3.0.15Chef Expeditor2020-07-161-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 3.0.14 by Chef Expeditorv3.0.14Chef Expeditor2020-07-161-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 3.0.13 by Chef Expeditorv3.0.13Chef Expeditor2020-07-161-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 3.0.12 by Chef Expeditorv3.0.12Chef Expeditor2020-07-161-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* add a simple smoke testlcg/extract-mixlib-shelloutLamont Granquist2020-07-161-1/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* extracting shell_out helper to mixlib-shelloutLamont Granquist2020-07-151-0/+208
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Bump version to 3.0.11 by Chef Expeditorv3.0.11Chef Expeditor2020-05-211-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 3.0.10 by Chef Expeditorv3.0.10Chef Expeditor2020-03-081-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 3.0.9 by Chef Expeditorv3.0.9Chef Expeditor2019-12-301-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Substitute require for require_relativeTim Smith2019-12-291-1/+1
| | | | | | require_relative is significantly faster and should be used when available. Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 3.0.8 by Chef Expeditorv3.0.8Chef Expeditor2019-12-301-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 3.0.7 by Chef Expeditor3.0.7Chef Expeditor2019-07-301-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Fix return type of Process.create to be a ProcessInfo instance again.Ryan Davis2019-07-302-1/+5
| | | | | | | | | | | | This fixes compatibility with win32-process' Process.create while maintaining the rest of our changes. This moves Process.create to Process.create3. Process.create now calls create3 and returns the ProcessInfo. The break came from PR #177, which is fairly extensive, so I'm only rolling out the return type change on this method. Signed-off-by: Ryan Davis <zenspider@chef.io>
* Bump version to 3.0.6 by Chef Expeditor3.0.6Chef Expeditor2019-07-301-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Blinding applying chefstyle -a.Ryan Davis2019-07-303-10/+25
| | | | Signed-off-by: Ryan Davis <zenspider@chef.io>
* Bump version to 3.0.5 by Chef Expeditor3.0.5Chef Expeditor2019-06-071-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 3.0.4 by Chef Expeditorv3.0.4Chef Expeditor2019-06-061-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #177 from visioncritical/load_user_profileLamont Granquist2019-06-062-67/+185
|\ | | | | Load and unload user profile as required
| * cleanup Rubocop violationsBrian Warsing2019-01-261-17/+16
| | | | | | | | Signed-off-by: Brian Warsing <brian.warsing@visioncritical.com>
| * Load and unload user profile as requiredBrian Warsing2019-01-232-67/+186
| | | | | | | | | | | | | | | | | | - bind related C++ funcs, add types and constants - refactor similar func calls into component methods - make Process#create return trio of process-related objects - ensure delayed profile unload and token destruction Signed-off-by: Brian Warsing <brian.warsing@visioncritical.com>
* | Bump version to 3.0.3 by Chef Expeditorv3.0.3Chef Expeditor2019-06-061-1/+1
| | | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | Merge pull request #182 from chef/lcg/win-array-argsLamont Granquist2019-06-061-2/+42
|\ \ | | | | | | Support array args on windows WIP
| * | Support array args on windowslcg/win-array-argsLamont Granquist2019-06-061-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>