Skip to content

Commit

Permalink
Allow creating/applying ruletypes from standard input (#4959)
Browse files Browse the repository at this point in the history
We had added that ability in the initial implementation, but had lost it
once we started skipping files more thoroughly. This recovers that.

Signed-off-by: Juan Antonio Osorio <[email protected]>
  • Loading branch information
JAORMX authored Nov 13, 2024
1 parent 5092894 commit 84d517a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/cli/app/ruletype/ruletype_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func applyCommand(_ context.Context, cmd *cobra.Command, _ []string, conn *grpc.
}

for _, f := range files {
if shouldSkipFile(f.Path) {
if f.Path != "-" && shouldSkipFile(f.Path) {
continue
}
// cmd.Context() is the root context. We need to create a new context for each file
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/app/ruletype/ruletype_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func createCommand(_ context.Context, cmd *cobra.Command, _ []string, conn *grpc
}

for _, f := range files {
if shouldSkipFile(f.Path) {
if f.Path != "-" && shouldSkipFile(f.Path) {
continue
}
// cmd.Context() is the root context. We need to create a new context for each file
Expand Down

0 comments on commit 84d517a

Please sign in to comment.