fix default modelfile for create (#8452)

This commit is contained in:
Patrick Devine 2025-01-16 01:14:04 -08:00 committed by GitHub
parent 42cf4db601
commit a420a453b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ func getModelfileName(cmd *cobra.Command) (string, error) {
_, err = os.Stat(absName)
if err != nil {
return filename, err
return "", err
}
return absName, nil

View File

@ -279,7 +279,7 @@ func TestGetModelfileName(t *testing.T) {
name: "no modelfile specified, no modelfile exists",
modelfileName: "",
fileExists: false,
expectedName: "Modelfile",
expectedName: "",
expectedErr: os.ErrNotExist,
},
{
@ -293,7 +293,7 @@ func TestGetModelfileName(t *testing.T) {
name: "modelfile specified, no modelfile exists",
modelfileName: "crazyfile",
fileExists: false,
expectedName: "crazyfile",
expectedName: "",
expectedErr: os.ErrNotExist,
},
{