Catch InvalidVersion errors from vagrant_cloud client

This commit adds a new rescue to the `publish` command for when the
client detects an invalid version prior to making the API request to
create that version.
This commit is contained in:
Brian Cain 2018-12-17 14:41:29 -08:00
parent 6bff374e79
commit ca6cc140ff
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
1 changed files with 4 additions and 0 deletions

View File

@ -127,6 +127,10 @@ module VagrantPlugins
@env.ui.error(e)
return 1
end
rescue VagrantCloud::InvalidVersion => e
@env.ui.error(I18n.t("cloud_command.errors.publish.fail", org: org, box_name: box_name))
@env.ui.error(e)
return 1
end
begin