Skip to content

Commit

Permalink
plug archive runner into wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Oct 23, 2024
1 parent 60574aa commit a70c9ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cmd/slackdump/internal/archive/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ var CmdArchive = &base.Command{
Short: "archive the workspace or individual conversations on disk",
Long: mdArchive,
FlagMask: cfg.OmitUserCacheFlag | cfg.OmitCacheDir,
Wizard: archiveWizard,
RequireAuth: true,
PrintFlags: true,
}

func init() {
CmdArchive.Wizard = archiveWizard
}

var (
errNoOutput = errors.New("output directory is required")
)
Expand Down
4 changes: 3 additions & 1 deletion cmd/slackdump/internal/archive/wizard.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ LOOP:
return err
}
case "run":
//TODO: implement archive
if err := RunArchive(ctx, CmdArchive, nil); err != nil {
return err
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/slackdump/internal/ui/cfgui/updaters/filepick.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (m FileModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
*m.v = msg.Filepath
if m.validate != nil {
if err := m.validate(*m.v); err != nil {
// send error message
// set error message
m.err = err
} else {
// we are done.
Expand Down

0 comments on commit a70c9ca

Please sign in to comment.