cmd/init: print workspace path

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-05-26 16:26:13 +02:00
parent 9d1609187e
commit 1f4bbc53ad
2 changed files with 7 additions and 1 deletions

View File

@ -36,10 +36,12 @@ var initCmd = &cobra.Command{
dir = cwd
}
_, err := state.Init(ctx, dir)
ws, err := state.Init(ctx, dir)
if err != nil {
lg.Fatal().Err(err).Msg("failed to initialize workspace")
}
lg.Info().Str("path", ws.DaggerDir()).Msg("initialized new empty workspace")
},
}

View File

@ -268,3 +268,7 @@ func (w *Workspace) Create(ctx context.Context, name string) (*State, error) {
return st, nil
}
func (w *Workspace) DaggerDir() string {
return path.Join(w.Path, daggerDir)
}