Skip to content

Commit

Permalink
Merge pull request #1223 from mrpalide/feature/flag-bin-path-and-buil…
Browse files Browse the repository at this point in the history
…d-musl-on-release

`--binpath` flag
  • Loading branch information
ersonp authored May 25, 2022
2 parents cc6312c + 8b28434 commit 76f20b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/skywire-cli/commands/config/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var (
svcconf = strings.ReplaceAll(utilenv.ServiceConfAddr, "http://", "") //skyenv.DefaultServiceConfAddr
testconf = strings.ReplaceAll(utilenv.TestServiceConfAddr, "http://", "") //skyenv.DefaultServiceConfAddr
hiddenflags []string
binPath string
)

func init() {
Expand Down Expand Up @@ -112,6 +113,8 @@ func init() {
genConfigCmd.Flags().StringVar(&ver, "version", "", "custom version testing override")
hiddenflags = append(hiddenflags, "version")
genConfigCmd.Flags().BoolVar(&all, "all", false, "show all flags")
genConfigCmd.Flags().StringVar(&binPath, "binpath", "", "set bin_path")
hiddenflags = append(hiddenflags, "binpath")

for _, j := range hiddenflags {
genConfigCmd.Flags().MarkHidden(j) //nolint
Expand Down Expand Up @@ -372,6 +375,11 @@ var genConfigCmd = &cobra.Command{
conf.Hypervisor.EnableAuth = true
}
}
// check binpath argument and use if set
if binPath != "" {
conf.Launcher.BinPath = binPath
}

if ver != "" {
conf.Common.Version = ver
}
Expand Down

0 comments on commit 76f20b0

Please sign in to comment.