Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
Re-instate ability for layout add to use an existing layout
Browse files Browse the repository at this point in the history
Fixes #25
  • Loading branch information
glyn authored and ericbottard committed Sep 23, 2019
1 parent 146bd40 commit 6e410f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/irel/layout_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ package irel

import (
"fmt"
"log"

"github.com/pivotal/image-relocation/pkg/image"
"github.com/pivotal/image-relocation/pkg/registry/ggcr"
"github.com/spf13/cobra"
"log"
)

func newCmdLayoutAdd() *cobra.Command {
Expand All @@ -41,7 +42,7 @@ func layoutAdd(cmd *cobra.Command, args []string) {
}

regClient := ggcr.NewRegistryClient()
layout, err := regClient.NewLayout(layoutPath)
layout, err := regClient.ReadLayout(layoutPath)
if err != nil {
layout, err = regClient.NewLayout(layoutPath)
if err != nil {
Expand Down

0 comments on commit 6e410f4

Please sign in to comment.