Skip to content

Commit

Permalink
Merge pull request machine-drivers#22 from cfergeau/bundlename
Browse files Browse the repository at this point in the history
Return an error when BundleName is not set
  • Loading branch information
praveenkumar authored Aug 27, 2019
2 parents 34d5b60 + 6487db2 commit b804b78
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libmachine/drivers/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
)

const (
DefaultSSHUser = "core"
DefaultSSHPort = 22
DefaultSSHUser = "core"
DefaultSSHPort = 22
DefaultPrivateKey = "id_rsa_rsc"
)

Expand Down Expand Up @@ -82,6 +82,9 @@ func (d *BaseDriver) ResolveStorePath(file string) string {
}

// Returns the name of the bundle which was used to create this machine
func (d* BaseDriver) GetBundleName() (string, error) {
func (d *BaseDriver) GetBundleName() (string, error) {
if d.BundleName == "" {
return "", errors.New("Bundle name is not set")
}
return d.BundleName, nil
}

0 comments on commit b804b78

Please sign in to comment.