[Pkg-puppet-devel] [facter] 232/352: (FACT-321) Remove deprecated windows shell builtin execution

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:48 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 6632a232168a44bbdb765945474dc83e0c64e247
Author: Adrien Thebo <git at somethingsinistral.net>
Date:   Thu Feb 6 11:02:25 2014 -0800

    (FACT-321) Remove deprecated windows shell builtin execution
---
 lib/facter/core/execution.rb | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/lib/facter/core/execution.rb b/lib/facter/core/execution.rb
index f9880ff..cdcd03f 100644
--- a/lib/facter/core/execution.rb
+++ b/lib/facter/core/execution.rb
@@ -176,20 +176,13 @@ module Facter
             # if we can find the binary, we'll run the command with the expanded path to the binary
             code = expanded_code
           else
-            # if we cannot find the binary return nil on posix. On windows we'll still try to run the
-            # command in case it is a shell-builtin. In case it is not, windows will raise Errno::ENOENT
-            return nil unless Facter::Util::Config.is_windows?
-            return nil if absolute_path?(code)
+            return nil
           end
 
           out = nil
 
           begin
             out = %x{#{code}}.chomp
-            Facter.warnonce "Using Facter::Util::Execution.exec with a shell built-in is deprecated. Most built-ins can be replaced with native ruby commands. If you really have to run a built-in, pass \"cmd /c your_builtin\" as a command (command responsible for this message was \"#{code}\")" unless expanded_code
-          rescue Errno::ENOENT => detail
-            # command not found on Windows
-            return nil
           rescue => detail
             Facter.warn(detail)
             return nil

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list