only turn relative path into absolute path

This commit is contained in:
Danny 2018-05-23 14:52:38 +02:00
parent fb36c6ae6c
commit 05b2cc53a2
1 changed files with 5 additions and 5 deletions

View File

@ -1,12 +1,14 @@
package config
import (
"math/rand"
"os"
"path/filepath"
"github.com/joho/godotenv"
"github.com/kelseyhightower/envconfig"
log "github.com/sirupsen/logrus"
"github.com/usefathom/fathom/pkg/datastore/sqlstore"
"math/rand"
"os"
)
// Config wraps the configuration structs for the various application parts
@ -21,9 +23,7 @@ func Parse(file string) *Config {
var err error
if file != "" {
// get absolute path to config file
wd, _ := os.Getwd()
absfile := wd + "/" + file
absfile, _ := filepath.Abs(file)
// check if file exists
_, err := os.Stat(absfile)