mirror of
https://github.com/taigrr/mg.git
synced 2026-04-02 03:28:42 -07:00
update messaging
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
@@ -22,7 +21,6 @@ var registerCmd = &cobra.Command{
|
|||||||
if len(args) == 1 {
|
if len(args) == 1 {
|
||||||
path = args[0]
|
path = args[0]
|
||||||
}
|
}
|
||||||
fmt.Printf("register called for %s\n", path)
|
|
||||||
r, err := git.PlainOpenWithOptions(path, &(git.PlainOpenOptions{DetectDotGit: true}))
|
r, err := git.PlainOpenWithOptions(path, &(git.PlainOpenOptions{DetectDotGit: true}))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
@@ -52,7 +50,7 @@ var registerCmd = &cobra.Command{
|
|||||||
path = newPath.Filesystem.Root()
|
path = newPath.Filesystem.Root()
|
||||||
for _, v := range conf.Repos {
|
for _, v := range conf.Repos {
|
||||||
if v.Path == path {
|
if v.Path == path {
|
||||||
log.Println("repo already registered")
|
log.Printf("repo %s already registered\n", path)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user