Skip to content

Commit b62d329

Browse files
committed
fix(cli): add warning when enabling orion plugins in aspect oss cli (#8278)
To reduce all the confusion with pro vs oss and plugin support. --- ### Changes are visible to end-users: no ### Test plan - Covered by existing test cases GitOrigin-RevId: ef2e16448c6f201ab71cd86d87028f8a7b0cd690
1 parent 044de0d commit b62d329

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cmd/aspect/configure/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ go_library(
66
importpath = "github.com/aspect-build/aspect-cli/cmd/aspect/configure",
77
visibility = ["//visibility:public"],
88
deps = [
9+
"//buildinfo",
910
"//pkg/aspect/configure",
1011
"//pkg/aspect/root/flags",
1112
"//pkg/aspecterrors",

cmd/aspect/configure/configure.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/spf13/cobra"
2424
"github.com/spf13/viper"
2525

26+
"github.com/aspect-build/aspect-cli/buildinfo"
2627
"github.com/aspect-build/aspect-cli/pkg/aspect/configure"
2728
"github.com/aspect-build/aspect-cli/pkg/aspect/root/flags"
2829
"github.com/aspect-build/aspect-cli/pkg/aspecterrors"
@@ -89,6 +90,12 @@ Run 'aspect help directives' or see https://docs.aspect.build/cli/help/directive
8990
func run(streams ioutils.Streams, v *configure.Configure, mode string, args []string) error {
9091
addCliEnabledLanguages(v)
9192

93+
if buildinfo.Current().OpenSource {
94+
if configurePlugins := viper.GetStringSlice("configure.plugins"); len(configurePlugins) > 0 {
95+
fmt.Fprintln(streams.Stderr, "WARNING: Aspect CLI configure.plugins are not supported in Aspect OSS CLI.")
96+
}
97+
}
98+
9299
err := v.Run(mode, args)
93100
if aspectError, isAError := err.(*aspecterrors.ExitError); isAError && aspectError.ExitCode == aspecterrors.ConfigureNoConfig {
94101
fmt.Fprintln(streams.Stderr, `No languages enabled for BUILD file generation.

0 commit comments

Comments
 (0)