Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- feat(commands/ngwaf/customsignals): add support for CRUD operations for NGWAF Custom Signals ([#1592](https://github.com/fastly/cli/pull/1592))

### Bug fixes:
- fix(commands/ngwaf/virtualpatch): ensured a check was in place for the 'update' command that disallowed the --json and --verbose flag to be ran at the same time. ([#1596](https://github.com/fastly/cli/pull/1596))
- fix(commands/ngwaf/redaction): ensured a check was in place for the 'create' and 'update' commands that disallowed the --json and --verbose flag to be ran at the same time. ([#1596](https://github.com/fastly/cli/pull/1596))

### Dependencies:
- build(deps): `golang.org/x/crypto` from 0.43.0 to 0.45.0 ([#1584](https://github.com/fastly/cli/pull/1584))
Expand Down
5 changes: 5 additions & 0 deletions pkg/commands/ngwaf/workspace/redaction/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/fastly/go-fastly/v12/fastly/ngwaf/v1/workspaces/redactions"

"github.com/fastly/cli/pkg/argparser"
fsterr "github.com/fastly/cli/pkg/errors"
"github.com/fastly/cli/pkg/global"
"github.com/fastly/cli/pkg/text"
)
Expand Down Expand Up @@ -57,6 +58,10 @@ func (c *CreateCommand) Exec(_ io.Reader, out io.Writer) error {
return err
}

if c.Globals.Verbose() && c.JSONOutput.Enabled {
return fsterr.ErrInvalidVerboseJSONCombo
}

var err error
input := &redactions.CreateInput{
Field: &c.field,
Expand Down
5 changes: 5 additions & 0 deletions pkg/commands/ngwaf/workspace/redaction/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/fastly/go-fastly/v12/fastly/ngwaf/v1/workspaces/redactions"

"github.com/fastly/cli/pkg/argparser"
fsterr "github.com/fastly/cli/pkg/errors"
"github.com/fastly/cli/pkg/global"
"github.com/fastly/cli/pkg/text"
)
Expand Down Expand Up @@ -61,6 +62,10 @@ func (c *UpdateCommand) Exec(_ io.Reader, out io.Writer) error {
return err
}

if c.Globals.Verbose() && c.JSONOutput.Enabled {
return fsterr.ErrInvalidVerboseJSONCombo
}

var err error
input := &redactions.UpdateInput{
RedactionID: &c.redactionID,
Expand Down
5 changes: 5 additions & 0 deletions pkg/commands/ngwaf/workspace/virtualpatch/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/fastly/go-fastly/v12/fastly/ngwaf/v1/workspaces/virtualpatches"

"github.com/fastly/cli/pkg/argparser"
fsterr "github.com/fastly/cli/pkg/errors"
"github.com/fastly/cli/pkg/global"
"github.com/fastly/cli/pkg/text"
)
Expand Down Expand Up @@ -56,6 +57,10 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman

// Exec invokes the application logic for the command.
func (c *UpdateCommand) Exec(_ io.Reader, out io.Writer) error {
if c.Globals.Verbose() && c.JSONOutput.Enabled {
return fsterr.ErrInvalidVerboseJSONCombo
}

var err error
input := &virtualpatches.UpdateInput{
VirtualPatchID: &c.virtualpatchID,
Expand Down