Insert namespace after validating the specs (#3164)
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
This commit is contained in:
@@ -177,11 +177,6 @@ func (opts *ApplySubCommand) run(input cli.Input) error {
|
|||||||
return errors.Wrap(err, "error reading specs")
|
return errors.Wrap(err, "error reading specs")
|
||||||
}
|
}
|
||||||
|
|
||||||
err = opts.insertNamespace(input, fr)
|
|
||||||
if err != nil {
|
|
||||||
return errors.Wrap(err, "error reading specs")
|
|
||||||
}
|
|
||||||
|
|
||||||
if validateSpecs {
|
if validateSpecs {
|
||||||
err = validateForApply(input, fr)
|
err = validateForApply(input, fr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -189,6 +184,11 @@ func (opts *ApplySubCommand) run(input cli.Input) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = opts.insertNamespace(input, fr)
|
||||||
|
if err != nil {
|
||||||
|
return errors.Wrap(err, "error inserting namespace")
|
||||||
|
}
|
||||||
|
|
||||||
err = warnIfDirtyWorkTree(filepath.Clean(specDir + "/.."))
|
err = warnIfDirtyWorkTree(filepath.Clean(specDir + "/.."))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
console.Warn(err.Error())
|
console.Warn(err.Error())
|
||||||
|
|||||||
Reference in New Issue
Block a user