Skip to content

Commit

Permalink
Merge pull request #264 from epaulson10/fix-schema-stdin
Browse files Browse the repository at this point in the history
Fix bug when writing schema supplied via stdin
  • Loading branch information
vroldanbet authored Jul 12, 2023
2 parents bd74043 + 2c2bd5c commit 3073171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cmd/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func schemaCopyCmdFunc(cmd *cobra.Command, args []string) error {
}

func schemaWriteCmdFunc(cmd *cobra.Command, args []string) error {
if len(args) == 0 && term.IsTerminal(int(os.Stdout.Fd())) {
if len(args) == 0 && term.IsTerminal(int(os.Stdin.Fd())) {
return fmt.Errorf("must provide file path or contents via stdin")
}

Expand Down

0 comments on commit 3073171

Please sign in to comment.