# File lib/facter/core/execution/windows.rb, line 40 def expand_command(command) exe = nil args = nil if (match = command.match(DOUBLE_QUOTED_COMMAND)) exe, args = match.captures else exe, args = command.split(/ /,2) end if exe and (expanded = which(exe)) expanded = "\"#{expanded}\"" if expanded.match(/\s+/) expanded << " #{args}" if args return expanded end end