Require that .hoster.yml is located in the users home dir.
This commit is contained in:
parent
e7ed0407a3
commit
eb0141f3bc
@ -4,18 +4,24 @@ import (
|
||||
"hoster/cmd/hoster_cli/commands"
|
||||
"hoster/internals/conf"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/kataras/golog"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
conf.LoadConfig(".hoster.yml")
|
||||
homeDir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
golog.Fatalf("Error getting home directory: %v", err)
|
||||
}
|
||||
|
||||
conf.LoadConfig(filepath.Join(homeDir, ".hoster.yml"))
|
||||
|
||||
app := &cli.App{
|
||||
Name: "hoster",
|
||||
Usage: "Hoster",
|
||||
Version: "1.0.1",
|
||||
Version: "1.0.2",
|
||||
Commands: []*cli.Command{
|
||||
{
|
||||
Name: "new",
|
||||
|
Loading…
Reference in New Issue
Block a user