File tree Expand file tree Collapse file tree 8 files changed +30
-1
lines changed
Expand file tree Collapse file tree 8 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import (
1414 "github.com/werf/werf/v2/pkg/git_repo/gitdata"
1515 "github.com/werf/werf/v2/pkg/true_git"
1616 "github.com/werf/werf/v2/pkg/werf"
17+ "github.com/werf/werf/v2/pkg/werf/global_warnings"
1718)
1819
1920var commonCmdData common.CmdData
@@ -50,6 +51,8 @@ func NewCmd(ctx context.Context) *cobra.Command {
5051 RunE : func (cmd * cobra.Command , args []string ) error {
5152 ctx := cmd .Context ()
5253
54+ global_warnings .SuppressGlobalWarnings = true
55+
5356 if err := common .ProcessLogOptions (& commonCmdData ); err != nil {
5457 common .PrintHelp (cmd )
5558 return err
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111 "github.com/werf/werf/v2/pkg/git_repo/gitdata"
1212 "github.com/werf/werf/v2/pkg/true_git"
1313 "github.com/werf/werf/v2/pkg/werf"
14+ "github.com/werf/werf/v2/pkg/werf/global_warnings"
1415)
1516
1617var (
@@ -32,6 +33,8 @@ func NewCmd(ctx context.Context) *cobra.Command {
3233 RunE : func (cmd * cobra.Command , _ []string ) error {
3334 ctx := cmd .Context ()
3435
36+ global_warnings .SuppressGlobalWarnings = true
37+
3538 if err := common .ProcessLogOptions (& commonCmdData ); err != nil {
3639 common .PrintHelp (cmd )
3740 return err
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
1212 "github.com/werf/werf/v2/pkg/git_repo/gitdata"
1313 "github.com/werf/werf/v2/pkg/true_git"
1414 "github.com/werf/werf/v2/pkg/werf"
15+ "github.com/werf/werf/v2/pkg/werf/global_warnings"
1516)
1617
1718var commonCmdData common.CmdData
@@ -28,6 +29,12 @@ func NewCmd(ctx context.Context) *cobra.Command {
2829 RunE : func (cmd * cobra.Command , args []string ) error {
2930 ctx := cmd .Context ()
3031
32+ global_warnings .SuppressGlobalWarnings = true
33+ if * commonCmdData .LogVerbose || * commonCmdData .LogDebug {
34+ global_warnings .SuppressGlobalWarnings = false
35+ }
36+ defer global_warnings .PrintGlobalWarnings (ctx )
37+
3138 if err := common .ProcessLogOptions (& commonCmdData ); err != nil {
3239 common .PrintHelp (cmd )
3340 return err
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import (
2222 "github.com/werf/werf/v2/pkg/true_git"
2323 "github.com/werf/werf/v2/pkg/util"
2424 "github.com/werf/werf/v2/pkg/werf"
25+ "github.com/werf/werf/v2/pkg/werf/global_warnings"
2526)
2627
2728var getAutogeneratedValuedCmdData common.CmdData
@@ -40,6 +41,8 @@ func NewGetAutogeneratedValuesCmd(ctx context.Context) *cobra.Command {
4041 RunE : func (cmd * cobra.Command , args []string ) error {
4142 ctx := cmd .Context ()
4243
44+ global_warnings .SuppressGlobalWarnings = true
45+
4346 if err := common .ProcessLogOptions (& getAutogeneratedValuedCmdData ); err != nil {
4447 common .PrintHelp (cmd )
4548 return err
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
1212 "github.com/werf/werf/v2/pkg/git_repo/gitdata"
1313 "github.com/werf/werf/v2/pkg/true_git"
1414 "github.com/werf/werf/v2/pkg/werf"
15+ "github.com/werf/werf/v2/pkg/werf/global_warnings"
1516)
1617
1718var getNamespaceCmdData common.CmdData
@@ -25,6 +26,8 @@ func NewGetNamespaceCmd(ctx context.Context) *cobra.Command {
2526 RunE : func (cmd * cobra.Command , args []string ) error {
2627 ctx := cmd .Context ()
2728
29+ global_warnings .SuppressGlobalWarnings = true
30+
2831 if err := common .ProcessLogOptions (& getNamespaceCmdData ); err != nil {
2932 common .PrintHelp (cmd )
3033 return err
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
1212 "github.com/werf/werf/v2/pkg/git_repo/gitdata"
1313 "github.com/werf/werf/v2/pkg/true_git"
1414 "github.com/werf/werf/v2/pkg/werf"
15+ "github.com/werf/werf/v2/pkg/werf/global_warnings"
1516)
1617
1718var getReleaseCmdData common.CmdData
@@ -25,6 +26,8 @@ func NewGetReleaseCmd(ctx context.Context) *cobra.Command {
2526 RunE : func (cmd * cobra.Command , args []string ) error {
2627 ctx := cmd .Context ()
2728
29+ global_warnings .SuppressGlobalWarnings = true
30+
2831 if err := common .ProcessLogOptions (& getReleaseCmdData ); err != nil {
2932 common .PrintHelp (cmd )
3033 return err
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ func NewCmd(ctx context.Context) *cobra.Command {
6262 ctx := cmd .Context ()
6363
6464 global_warnings .SuppressGlobalWarnings = true
65- if * commonCmdData .LogVerbose || * commonCmdData . LogDebug {
65+ if * commonCmdData .LogDebug {
6666 global_warnings .SuppressGlobalWarnings = false
6767 }
6868 defer global_warnings .PrintGlobalWarnings (ctx )
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import (
1919 "github.com/werf/werf/v2/pkg/tmp_manager"
2020 "github.com/werf/werf/v2/pkg/true_git"
2121 "github.com/werf/werf/v2/pkg/werf"
22+ "github.com/werf/werf/v2/pkg/werf/global_warnings"
2223)
2324
2425var commonCmdData common.CmdData
@@ -36,6 +37,12 @@ func NewCmd(ctx context.Context) *cobra.Command {
3637 RunE : func (cmd * cobra.Command , args []string ) error {
3738 ctx := cmd .Context ()
3839
40+ global_warnings .SuppressGlobalWarnings = true
41+ if * commonCmdData .LogDebug {
42+ global_warnings .SuppressGlobalWarnings = false
43+ }
44+ defer global_warnings .PrintGlobalWarnings (ctx )
45+
3946 logboek .SetAcceptedLevel (level .Error )
4047
4148 var imageName string
You can’t perform that action at this time.
0 commit comments