Skip to content

Commit

Permalink
Merge pull request #1108 from mrpalide/fix/change-o-flag-functionallity
Browse files Browse the repository at this point in the history
Fix logic of `-o` flag in generate config
  • Loading branch information
0pcom authored Feb 22, 2022
2 parents 210d7d5 + 043ac19 commit 006771f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cmd/skywire-cli/commands/config/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,15 @@ var genConfigCmd = &cobra.Command{
logger.Fatal("Failed to create config: use of mutually exclusive flags")
}

//check -o --output flag set manually or not, if yes override package and skybian config flag
if cmd.Flags().Changed("output") {
packageConfig = false
}

//set output for package and skybian configs
if packageConfig {
configName := "skywire-visor.json"
if hypervisor {
configName = "skywire.json"
}
output = filepath.Join(skyenv.PackageSkywirePath(), configName)
if !cmd.Flags().Changed("output") {
output = filepath.Join(skyenv.PackageSkywirePath(), configName)
}
}

// Read in old config (if any) and obtain old secret key.
Expand Down

0 comments on commit 006771f

Please sign in to comment.