diff --git a/commands/command_init.go b/commands/command_init.go index 37c036e6..66837e9f 100644 --- a/commands/command_init.go +++ b/commands/command_init.go @@ -22,14 +22,14 @@ func (c *InitCommand) Run() { switch sub { case "hooks": if err := c.hookInit(); err != nil { - fmt.Println(err) + gitmedia.Print("%s", err) return } default: c.runInit() } - fmt.Println("git media initialized") + gitmedia.Print("git media initialized") } func (c *InitCommand) runInit() { @@ -55,11 +55,11 @@ func setFilter(filterName string) { existing := gitconfig.Find(key) if shouldReset(existing) { - fmt.Printf("Installing %s filter\n", filterName) + gitmedia.Print("Installing %s filter", filterName) gitconfig.UnsetGlobal(key) gitconfig.SetGlobal(key, value) } else if existing != value { - fmt.Printf("The %s filter should be \"%s\" but is \"%s\"\n", filterName, value, existing) + gitmedia.Print("The %s filter should be \"%s\" but is \"%s\"", filterName, value, existing) } } @@ -72,7 +72,7 @@ func requireFilters() { gitconfig.UnsetGlobal(key) gitconfig.SetGlobal(key, value) } else if existing != value { - fmt.Printf("Media filters should be required but are not") + gitmedia.Print("Media filters should be required but are not") } }