Skip to content

Commit

Permalink
Merge pull request #819 from jamesgol/reaction_file
Browse files Browse the repository at this point in the history
Include reaction file path in output
  • Loading branch information
rkervella authored Sep 1, 2022
2 parents 7e63396 + 044688a commit 336068c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/command/reaction/save.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package reaction
*/

import (
"fmt"
"os"

"github.com/AlecAivazis/survey/v2"
Expand All @@ -29,9 +30,10 @@ import (

// ReactionSaveCmd - Manage reactions to events
func ReactionSaveCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
if _, err := os.Stat(GetReactionFilePath()); !os.IsNotExist(err) {
reactionPath := GetReactionFilePath()
if _, err := os.Stat(reactionPath); !os.IsNotExist(err) {
confirm := false
prompt := &survey.Confirm{Message: "Overwrite reactions on disk?"}
prompt := &survey.Confirm{Message: fmt.Sprintf("Overwrite reactions (%s) on disk?", reactionPath)}
survey.AskOne(prompt, &confirm)
if !confirm {
return
Expand All @@ -41,6 +43,6 @@ func ReactionSaveCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
if err != nil {
con.PrintErrorf("%s\n", err)
} else {
con.PrintInfof("Saved reactions to disk\n")
con.PrintInfof("Saved reactions to disk (%s)\n", reactionPath)
}
}

0 comments on commit 336068c

Please sign in to comment.