Skip to content

Commit

Permalink
refactor: Removed unnecessary import and debug statement
Browse files Browse the repository at this point in the history
  • Loading branch information
RamiAwar committed Feb 6, 2024
1 parent 236e0d8 commit cf11afa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"os"
"strings"

"github.com/fatih/color"
"github.com/knqyf263/pet/config"
"github.com/spf13/cobra"
"gopkg.in/alessio/shellescape.v1"
Expand All @@ -32,9 +31,8 @@ func execute(cmd *cobra.Command, args []string) (err error) {
return err
}
command := strings.Join(commands, "; ")
if config.Flag.Debug {
fmt.Printf("Command: %s\n", command)
}

// Show final command before executing it
fmt.Printf("> %s\n", command)

return run(command, os.Stdin, os.Stdout)
Expand All @@ -48,6 +46,4 @@ func init() {
`Initial value for query`)
execCmd.Flags().StringVarP(&config.Flag.FilterTag, "tag", "t", "",
`Filter tag`)
execCmd.Flags().BoolVarP(&config.Flag.Command, "command", "c", false,
`Show the command with the plain text before executing`)
}

0 comments on commit cf11afa

Please sign in to comment.