🔀 Merge branch 'rel/0.0.4' into stable
This commit is contained in:
commit
9ca2b9156d
2 changed files with 10 additions and 0 deletions
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## [0.0.4] - 2024-05-08
|
||||
|
||||
- ✨ Add -p flag to config to print config path
|
||||
|
||||
## [0.0.3] - 2024-03-11
|
||||
|
||||
- ✨ Add JSON formatter
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ var configCmd = &cobra.Command{
|
|||
//Long: ``,
|
||||
SilenceUsage: true,
|
||||
RunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||
print, _ := cmd.Flags().GetBool("print")
|
||||
if print {
|
||||
fmt.Fprintln(cmd.OutOrStdout(), config.ConfigPath)
|
||||
return nil
|
||||
}
|
||||
force, _ := cmd.Flags().GetBool("force")
|
||||
if !force {
|
||||
_, err = os.Stat(config.ConfigPath)
|
||||
|
|
@ -60,4 +65,5 @@ func init() {
|
|||
rootCmd.AddCommand(configCmd)
|
||||
|
||||
configCmd.Flags().BoolP("force", "f", false, "Force overwrite")
|
||||
configCmd.Flags().BoolP("print", "p", false, "Print path only")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue