Skip to content

Commit

Permalink
#11 show progress when handshaking with Vagrant cloud api
Browse files Browse the repository at this point in the history
  • Loading branch information
mhewedy committed Aug 21, 2020
1 parent 1be40d8 commit 6768def
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vagrant/image_url.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/mhewedy/vermin/progress"
"io/ioutil"
"net/http"
"strings"
Expand All @@ -24,6 +25,9 @@ type version struct {

func GetImageURL(image string) (string, error) {

stop := progress.Show("Getting Image information from Vagrant Cloud", false)
defer stop()

user, imageName, imageVersion := getImageParts(image)

req, err := http.NewRequest("GET", fmt.Sprintf("https://app.vagrantup.com/%s/boxes/%s", user, imageName), nil)
Expand Down

0 comments on commit 6768def

Please sign in to comment.