Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
895db383
Commit
895db383
authored
Aug 19, 2014
by
Jack Pearkes
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1411 from chrisfarms/master
fix panic when vagrant cloud response fails
parents
1e5d7467
51f55dda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
post-processor/vagrant-cloud/step_verify_box.go
post-processor/vagrant-cloud/step_verify_box.go
+6
-1
No files found.
post-processor/vagrant-cloud/step_verify_box.go
View file @
895db383
...
@@ -33,7 +33,12 @@ func (s *stepVerifyBox) Run(state multistep.StateBag) multistep.StepAction {
...
@@ -33,7 +33,12 @@ func (s *stepVerifyBox) Run(state multistep.StateBag) multistep.StepAction {
path
:=
fmt
.
Sprintf
(
"box/%s"
,
config
.
Tag
)
path
:=
fmt
.
Sprintf
(
"box/%s"
,
config
.
Tag
)
resp
,
err
:=
client
.
Get
(
path
)
resp
,
err
:=
client
.
Get
(
path
)
if
err
!=
nil
||
(
resp
.
StatusCode
!=
200
)
{
if
err
!=
nil
{
state
.
Put
(
"error"
,
fmt
.
Errorf
(
"Error retrieving box: %s"
,
err
))
return
multistep
.
ActionHalt
}
if
resp
.
StatusCode
!=
200
{
cloudErrors
:=
&
VagrantCloudErrors
{}
cloudErrors
:=
&
VagrantCloudErrors
{}
err
=
decodeBody
(
resp
,
cloudErrors
)
err
=
decodeBody
(
resp
,
cloudErrors
)
state
.
Put
(
"error"
,
fmt
.
Errorf
(
"Error retrieving box: %s"
,
cloudErrors
.
FormatErrors
()))
state
.
Put
(
"error"
,
fmt
.
Errorf
(
"Error retrieving box: %s"
,
cloudErrors
.
FormatErrors
()))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment