some light changes per PR feedback

This commit is contained in:
Zachary Flower 2018-02-25 22:21:16 -07:00
parent f46ebf5240
commit 42f72e1099
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ module Vagrant
keyword, command = line.split("=", 2).collect(&:strip)
# validate the keyword
if keyword.match(/[\s]/i)
if keyword.match(/\s/i)
raise Errors::AliasInvalidError, alias: line, message: "Alias keywords must not contain any whitespace."
end
@ -45,7 +45,7 @@ module Vagrant
lambda do |args|
# directly execute shell commands
if command.start_with?("!")
return exec "#{command[1..-1]} #{args.join(" ")}".strip
return Util::SafeExec.exec "#{command[1..-1]} #{args.join(" ")}".strip
end
return CLI.new(command.split.concat(args), @env).execute