File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package cmd
3
3
import (
4
4
"github.com/speakeasy-api/openapi-overlay/pkg/loader"
5
5
"github.com/spf13/cobra"
6
+ "gopkg.in/yaml.v3"
6
7
"os"
7
8
)
8
9
@@ -24,7 +25,7 @@ func RunApply(cmd *cobra.Command, args []string) {
24
25
}
25
26
26
27
var specFile string
27
- if len (args ) > 0 {
28
+ if len (args ) > 1 {
28
29
specFile = args [1 ]
29
30
}
30
31
ys , specFile , err := loader .LoadEitherSpecification (specFile , o )
@@ -37,7 +38,7 @@ func RunApply(cmd *cobra.Command, args []string) {
37
38
Dief ("Failed to apply overlay to spec file %q: %v" , specFile , err )
38
39
}
39
40
40
- err = o . Format (os .Stdout )
41
+ err = yaml . NewEncoder (os .Stdout ). Encode ( ys )
41
42
if err != nil {
42
43
Dief ("Failed to encode spec file %q: %v" , specFile , err )
43
44
}
You can’t perform that action at this time.
0 commit comments