This commit is contained in:
asoseil 2017-11-05 21:23:32 +01:00
parent 44e9f19d15
commit 395ac02944
1 changed files with 5 additions and 1 deletions

6
cmd.go
View File

@ -57,9 +57,13 @@ func (r *realize) clean() error {
// Add a new project // Add a new project
func (r *realize) add(p *cli.Context) error { func (r *realize) add(p *cli.Context) error {
path, err := filepath.Abs(p.String("path"))
if err != nil{
return err
}
project := Project{ project := Project{
Name: filepath.Base(filepath.Clean(p.String("path"))), Name: filepath.Base(filepath.Clean(p.String("path"))),
Path: filepath.Clean(p.String("path")), Path: path,
Cmds: Cmds{ Cmds: Cmds{
Vet: Cmd{ Vet: Cmd{
Status: p.Bool("vet"), Status: p.Bool("vet"),