Merge pull request #112 from jmorganca/fix-relative-modelfile

resolve modelfile before passing to server
This commit is contained in:
Michael Yang 2023-07-18 19:36:24 -07:00 committed by GitHub
commit 5540305293
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,7 @@ import (
"net" "net"
"net/http" "net/http"
"os" "os"
"path/filepath"
"strings" "strings"
"time" "time"
@ -25,6 +26,11 @@ import (
func create(cmd *cobra.Command, args []string) error { func create(cmd *cobra.Command, args []string) error {
filename, _ := cmd.Flags().GetString("file") filename, _ := cmd.Flags().GetString("file")
filename, err := filepath.Abs(filename)
if err != nil {
return err
}
client := api.NewClient() client := api.NewClient()
var spinner *Spinner var spinner *Spinner