Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyaoi committed Sep 25, 2018
1 parent fdfd075 commit ada4ac8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions cli/config.go
@@ -1,12 +1,12 @@
package main

import (
"os"
"bytes"
"github.com/BurntSushi/toml"
"github.com/mitchellh/go-homedir"
"io/ioutil"
"log"
"os"
"path/filepath"
)

Expand Down Expand Up @@ -75,15 +75,18 @@ func getDefaultConfig() cvpmConfig {
}

func validateConfig() {
localConfig := readConfig()
// localConfig := readConfig()
homepath, _ := homedir.Dir()
// Validate CVPM Path
cvpmPath := filepath.Join(homepath, "cvpm")
exist, err := isPathExists(cvpmPath)
if err != nil {
log.Fatal(err)
}
if !exist {
err:= os.Mkdir(cvpmPath, os.ModePerm)
err := os.Mkdir(cvpmPath, os.ModePerm)
if err != nil {
log.Fatal(err)
}
}
}
}
2 changes: 1 addition & 1 deletion cli/handler.go
Expand Up @@ -8,12 +8,12 @@ import (
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
"golang.org/x/crypto/ssh/terminal"
"syscall"
"log"
"os"
"path/filepath"
"strconv"
"strings"
"syscall"
)

func LoginHandler(c *cli.Context) User {
Expand Down

0 comments on commit ada4ac8

Please sign in to comment.