diff options
-rw-r--r-- | lib/mixlib/shellout/unix.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/mixlib/shellout/unix.rb b/lib/mixlib/shellout/unix.rb index bd20ffb..55a0372 100644 --- a/lib/mixlib/shellout/unix.rb +++ b/lib/mixlib/shellout/unix.rb @@ -194,8 +194,11 @@ module Mixlib # create a file because error pipe will auto close when we # try to create a file since it's set to CLOEXEC. if n != @process_status_pipe.last.to_i - fd = File.for_fd(n) rescue nil - fd.close if fd + begin + fd = File.for_fd(n) + fd.close if fd + rescue + end end end end |