Skip to content

Commit

Permalink
(release): v0.18.1 (#106)
Browse files Browse the repository at this point in the history
* (fix): allow cancellation on start time

* (release): v0.18.1
  • Loading branch information
lucassabreu authored Jul 12, 2021
1 parent e6ea51a commit 254ca9f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v0.18.1] - 2021-07-12

### Fixed

- when the input for start time is cancelled (ctrl+c), clockify-cli was blocking the user by looping
on the field until a valid date-time string was used, or the process were killed.

### Changed

- library `github.com/AlecAivazis/survey` updated to the latest version.
Expand Down Expand Up @@ -495,7 +502,11 @@ 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.17.0...HEAD
[Unreleased]: https://github.com/lucassabreu/clockify-cli/compare/v0.18.1...HEAD
[v0.18.1]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.18.1
[v0.18.0]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.18.0
[v0.17.2]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.17.2
[v0.17.1]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.17.1
[v0.17.0]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.17.0
[v0.16.1]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.16.1
[v0.16.0]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.16.0
Expand Down
8 changes: 6 additions & 2 deletions cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,16 @@ func getDateTimeParam(name string, required bool, value string, convert func(str
}

for {
value, _ = ui.AskForText(message, value)
value, err = ui.AskForText(message, value)
if err != nil {
return nil, err
}

if value == "" && !required {
return nil, nil
}

if t, err = convertToTime(value); err != nil {
if t, err = convert(value); err != nil {
fmt.Fprintln(os.Stderr, err.Error())
continue
}
Expand Down

0 comments on commit 254ca9f

Please sign in to comment.