Move login command warning

This commit moves where the warning is for the login command so that it
only displays when the command is invoked, and not when the plugin is
loaded.
This commit is contained in:
Brian Cain 2018-11-05 09:58:12 -08:00
parent c2cedc98c2
commit b951c0e781
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
2 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,10 @@ module Vagrant
return 0
end
if @sub_command == "login"
$stderr.puts "WARNING: This command has been deprecated and aliased to `vagrant cloud auth login`"
end
# If we reached this far then we must have a subcommand. If not,
# then we also just print the help and exit.
command_plugin = nil

View File

@ -14,7 +14,6 @@ module VagrantPlugins
command(:login) do
require File.expand_path("../../cloud/auth/login", __FILE__)
init!
$stderr.puts "WARNING: This command has been deprecated in favor of `vagrant cloud auth login`"
VagrantPlugins::CloudCommand::AuthCommand::Command::Login
end