diff --git a/CHANGELOG.md b/CHANGELOG.md index 08b94a47..24c6b5be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v0.8.1] - 2020-07-09 + +### Fixed + +- `clone` sub-command was not working because the `no-closing` viper config was being + connected with a non-existing `--no-closing` flag in the `in` sub-command, that does + not exist anymore. + ## [v0.8.0] - 2020-07-08 ### Added @@ -280,7 +288,8 @@ time entry. - Golang CLI using [cobra](https://github.com/spf13/cobra) - Makefile to help setup actions -[Unreleased]: https://github.com/lucassabreu/clockify-cli/compare/v0.8.0...HEAD +[Unreleased]: https://github.com/lucassabreu/clockify-cli/compare/v0.8.1...HEAD +[v0.8.1]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.8.1 [v0.8.0]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.8.0 [v0.7.2]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.7.2 [v0.7.1]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.7.1 diff --git a/cmd/clone.go b/cmd/clone.go index 6fd77205..51e90bfa 100644 --- a/cmd/clone.go +++ b/cmd/clone.go @@ -57,8 +57,9 @@ var cloneCmd = &cobra.Command{ } format, _ := cmd.Flags().GetString("format") + noClosing, _ := cmd.Flags().GetBool("no-closing") asJSON, _ := cmd.Flags().GetBool("json") - err = newEntry(c, tec, viper.GetBool("interactive"), !viper.GetBool("no-closing"), format, asJSON) + err = newEntry(c, tec, viper.GetBool("interactive"), !noClosing, format, asJSON) if err != nil { printError(err) } @@ -108,9 +109,7 @@ func init() { addTimeEntryFlags(cloneCmd) - cloneCmd.PersistentFlags().BoolVar(&noClosing, "no-closing", false, "don't close any active time entry") - _ = viper.BindPFlag("no-closing", inCmd.PersistentFlags().Lookup("no-closing")) - + cloneCmd.Flags().BoolP("no-closing", "", false, "don't close any active time entry") cloneCmd.Flags().StringP("format", "f", "", "golang text/template format to be applied on each time entry") cloneCmd.Flags().BoolP("json", "j", false, "print as json") }