Skip to content

Commit

Permalink
fix: set hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Yu authored and Shawn Yu committed May 13, 2024
1 parent c9017a7 commit 399d3fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ var configCmd = &cobra.Command{
func init() {
cmd.RootCmd.AddCommand(configCmd)
configCmd.Flags().StringVar(&flags.hostName, "hostname", "", "set the hostname")
configCmd.MarkFlagRequired("hostname")
}
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func Write(config Config) error {
if err != nil {
log.Fatal(err)
}
os.Mkdir(homeDir+"/.config/gh-ac-go/", 0777)
os.Mkdir(homeDir+"/.config/gh-ac/", 0777)

err = viper.WriteConfigAs(homeDir + "/.config/gh-ac-go/default-config.yml")
err = viper.WriteConfigAs(homeDir + "/.config/gh-ac/default-config.yml")
return err
}

0 comments on commit 399d3fb

Please sign in to comment.