Skip to content

Commit 445baa6

Browse files
committed
fix: don't set openapi-spec if revision is set
1 parent 617504a commit 445baa6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cmd/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ func getAPICommandContext(cmd *cli.Command) *apiCommandContext {
188188
// Get the directory containing the workspace config file
189189
configDir := filepath.Dir(config.ConfigPath)
190190

191-
if slices.Contains(names, "openapi-spec") && !cmd.IsSet("openapi-spec") && config.OpenAPISpec != "" {
191+
if slices.Contains(names, "openapi-spec") && !cmd.IsSet("openapi-spec") && !cmd.IsSet("revision") && config.OpenAPISpec != "" {
192192
// Set OpenAPI spec path relative to workspace config directory
193193
openAPIPath := filepath.Join(configDir, config.OpenAPISpec)
194194
cmd.Set("openapi-spec", openAPIPath)
195195
}
196196

197-
if slices.Contains(names, "stainless-config") && !cmd.IsSet("stainless-config") && config.StainlessConfig != "" {
197+
if slices.Contains(names, "stainless-config") && !cmd.IsSet("stainless-config") && !cmd.IsSet("revision") && config.StainlessConfig != "" {
198198
// Set Stainless config path relative to workspace config directory
199199
stainlessConfigPath := filepath.Join(configDir, config.StainlessConfig)
200200
cmd.Set("stainless-config", stainlessConfigPath)

0 commit comments

Comments
 (0)