mirror of https://github.com/databricks/cli.git
Run initialize phase from validate command (#145)
This lets the user know if their workspace connection is setup correctly.
This commit is contained in:
parent
4026b2cda2
commit
f70a5814f6
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
|
||||
"github.com/databricks/bricks/bundle"
|
||||
"github.com/databricks/bricks/bundle/phases"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -14,6 +15,13 @@ var validateCmd = &cobra.Command{
|
|||
PreRunE: ConfigureBundle,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
b := bundle.Get(cmd.Context())
|
||||
err := bundle.Apply(cmd.Context(), b, []bundle.Mutator{
|
||||
phases.Initialize(),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
buf, err := json.MarshalIndent(b.Config, "", " ")
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue