Review code comments; improved error messages for push

This commit is contained in:
Priya Wadhwa
2018-08-23 14:27:13 -07:00
parent cfa822f178
commit d867eadbb0
2 changed files with 8 additions and 12 deletions
+2 -6
View File
@@ -39,7 +39,8 @@ var (
)
func init() {
addSetupFlags(RootCmd)
RootCmd.PersistentFlags().StringVarP(&logLevel, "verbosity", "v", constants.DefaultLogLevel, "Log level (debug, info, warn, error, fatal, panic")
RootCmd.PersistentFlags().BoolVarP(&force, "force", "", false, "Force building outside of a container")
addKanikoOptionsFlags(RootCmd)
addHiddenFlags(RootCmd)
}
@@ -76,11 +77,6 @@ var RootCmd = &cobra.Command{
},
}
func addSetupFlags(cmd *cobra.Command) {
RootCmd.PersistentFlags().StringVarP(&logLevel, "verbosity", "v", constants.DefaultLogLevel, "Log level (debug, info, warn, error, fatal, panic")
RootCmd.PersistentFlags().BoolVarP(&force, "force", "", false, "Force building outside of a container")
}
// addKanikoOptionsFlags configures opts
func addKanikoOptionsFlags(cmd *cobra.Command) {
RootCmd.PersistentFlags().StringVarP(&opts.DockerfilePath, "dockerfile", "f", "Dockerfile", "Path to the dockerfile to be built.")