drop unnecessary -f from diff

This commit is contained in:
Jeffrey Regan
2018-05-18 11:24:23 -07:00
parent 00cb01a222
commit 6662bb6cc7
3 changed files with 19 additions and 40 deletions

View File

@@ -17,9 +17,7 @@ limitations under the License.
package commands
import (
"fmt"
"io"
"os"
"path/filepath"
"github.com/spf13/cobra"
@@ -46,17 +44,12 @@ func newCmdBuild(out, errOut 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/",
Run: func(cmd *cobra.Command, args []string) {
RunE: func(cmd *cobra.Command, args []string) error {
err := o.Validate(args)
if err != nil {
fmt.Fprintf(errOut, "error: %v\n", err)
os.Exit(1)
}
err = o.RunBuild(out, errOut, fs)
if err != nil {
fmt.Fprintf(errOut, "error: %v\n", err)
os.Exit(1)
return err
}
return o.RunBuild(out, errOut, fs)
},
}
return cmd