add modelpaths (#96)

This commit is contained in:
Patrick Devine 2023-07-17 22:44:21 -07:00 committed by GitHub
parent 1f45f7bb52
commit 4a28a2f093
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 147 additions and 80 deletions

View file

@ -48,7 +48,13 @@ func create(cmd *cobra.Command, args []string) error {
}
func RunRun(cmd *cobra.Command, args []string) error {
_, err := os.Stat(args[0])
mp := server.ParseModelPath(args[0])
fp, err := mp.GetManifestPath(false)
if err != nil {
return err
}
_, err = os.Stat(fp)
switch {
case errors.Is(err, os.ErrNotExist):
if err := pull(args[0]); err != nil {