From 03ebd8b71479425e04cbbabf9f35e9460a102b53 Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Thu, 10 Aug 2017 17:21:20 -0400 Subject: [PATCH] command/login: Add hostname to default token desc Uses `Socket.gethostname` to add the current hostname to the default description. --- plugins/commands/login/command.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/commands/login/command.rb b/plugins/commands/login/command.rb index fc110b827..c6700e960 100644 --- a/plugins/commands/login/command.rb +++ b/plugins/commands/login/command.rb @@ -1,3 +1,5 @@ +require 'socket' + module VagrantPlugins module LoginCommand class Command < Vagrant.plugin("2", "command") @@ -59,7 +61,7 @@ module VagrantPlugins password = @env.ui.ask("Password (will be hidden): ", echo: false) end - description_default = "Vagrant login" + description_default = "Vagrant login from #{Socket.gethostname}" while !description description = @env.ui.ask("Token description (Defaults to #{description_default.inspect}): ")