Enhancement for format error message

- add yaml format error handler
- silent usage when build command fails
This commit is contained in:
fanzhangio
2018-06-20 19:19:32 -07:00
parent a38befdaa1
commit 6a67183ed7
4 changed files with 116 additions and 2 deletions

View File

@@ -43,6 +43,7 @@ func newCmdBuild(out io.Writer, fs fs.FileSystem) *cobra.Command {
Short: "Print current configuration per contents of " + constants.KustomizationFileName,
Example: "Use the file somedir/" + constants.KustomizationFileName +
" to generate a set of api resources:\nbuild somedir/",
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
err := o.Validate(args)
if err != nil {