Skip to content

Commit

Permalink
fix: force interactive
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassabreu committed Jun 5, 2024
1 parent 98cb982 commit d5e203a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/cmd/time-entry/defaults/set/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ func NewCmdSet(
return err
}

c, err := f.Client()
if changed || d.Workspace != n.Workspace {
if n.TaskID != "" && n.ProjectID == "" {
return errors.New("can't set task without project")
}

c, err := f.Client()
if err != nil {
return err
}
Expand All @@ -71,19 +71,19 @@ func NewCmdSet(
}
}

if f.Config().IsInteractive() {
if n, err = ask(n, f.Config(), c, f.UI()); err != nil {
return err
}
}

if !f.Config().IsAllowNameForID() {
if err = checkIDs(c, n); err != nil {
return err
}
}
}

if f.Config().IsInteractive() {
if n, err = ask(n, f.Config(), c, f.UI()); err != nil {
return err
}
}

if err = f.TimeEntryDefaults().Write(n); err != nil {
return err
}
Expand Down

0 comments on commit d5e203a

Please sign in to comment.