Patrick Devine
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
3 deletions
-
cmd/cmd.go
-
cmd/cmd_test.go
|
|
|
@ -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 |
|
|
|
|
|
|
|
@ -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, |
|
|
|
}, |
|
|
|
{ |
|
|
|
|