Skip to content

Commit

Permalink
Merge pull request #125 from ersonp/fix/local-image
Browse files Browse the repository at this point in the history
Fix build with local image
  • Loading branch information
jdknives committed Oct 18, 2021
2 parents b3b0d37 + cbb674a commit 3b714f3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pkg/imager/fyne.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,6 @@ func (fg *FyneUI) generateBPS() (string, error) {
func (fg *FyneUI) build() {
bpsSlice := fg.bps

baseURL, err := releaseURL(fg.releases[fg.imgType], fg.remImg)
if err != nil {
err = fmt.Errorf("failed to find download URL for base image: %v", err)
dialog.ShowError(err, fg.w)
return
}

// Prepare builder.
builder, err := NewBuilder(fg.log, fg.wkDir)
if err != nil {
Expand All @@ -178,6 +171,12 @@ func (fg *FyneUI) build() {
buildImageStepDone := make(chan bool, 1)
switch fg.imgLoc {
case fg.locations[0]:
baseURL, err := releaseURL(fg.releases[fg.imgType], fg.remImg)
if err != nil {
err = fmt.Errorf("failed to find download URL for base image: %v", err)
dialog.ShowError(err, fg.w)
return
}
ctx, cancel := context.WithCancel(context.Background())
dlTitle := "Downloading Base Image"
dlMsg := fg.remImg + "\n" + baseURL
Expand Down

0 comments on commit 3b714f3

Please sign in to comment.