From d4cfee79d5f945ef23bd236e3ddce6c7aa3de884 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Tue, 18 Jul 2023 19:34:05 -0700 Subject: [PATCH] resolve modelfile before passing to server --- cmd/cmd.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/cmd.go b/cmd/cmd.go index 9478acc9..e7d06831 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -9,6 +9,7 @@ import ( "net" "net/http" "os" + "path/filepath" "strings" "time" @@ -25,6 +26,11 @@ import ( func create(cmd *cobra.Command, args []string) error { filename, _ := cmd.Flags().GetString("file") + filename, err := filepath.Abs(filename) + if err != nil { + return err + } + client := api.NewClient() var spinner *Spinner