Add EnsureComplete check to cluster init
This adds a quick sanity check to the `cluster init` command to verify that the Config object is valid prior to running the command. Note: This check is repeated later on when the command calls CurrentContextTargetPath, but that check is being removed in a separate change. Closes: #214 Change-Id: I405dbcf2df068f7f3aa008454f92620063de9d9e
This commit is contained in:
parent
aab8325af5
commit
ce80b3e7d9
@ -39,6 +39,9 @@ func NewCommand(rs *environment.AirshipCTLSettings) (*Command, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if err = rs.Config.EnsureComplete(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
root, err := rs.Config.CurrentContextTargetPath()
|
root, err := rs.Config.CurrentContextTargetPath()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user