cmd/init: print workspace path
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
parent
9d1609187e
commit
1f4bbc53ad
@ -36,10 +36,12 @@ var initCmd = &cobra.Command{
|
|||||||
dir = cwd
|
dir = cwd
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := state.Init(ctx, dir)
|
ws, err := state.Init(ctx, dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
lg.Fatal().Err(err).Msg("failed to initialize workspace")
|
lg.Fatal().Err(err).Msg("failed to initialize workspace")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lg.Info().Str("path", ws.DaggerDir()).Msg("initialized new empty workspace")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,3 +268,7 @@ func (w *Workspace) Create(ctx context.Context, name string) (*State, error) {
|
|||||||
|
|
||||||
return st, nil
|
return st, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (w *Workspace) DaggerDir() string {
|
||||||
|
return path.Join(w.Path, daggerDir)
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user