Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: let pro commands fail instead of succeed #1692

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/vcluster/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func ExecuteStart(ctx context.Context, options *StartOptions) error {
}

log.Info("In order to use a Pro feature, please contact us at https://www.vcluster.com/pro-demo or downgrade by running `vcluster upgrade --version v0.19.5`")
os.Exit(0)
os.Exit(1)
}

// get current namespace
Expand Down
2 changes: 1 addition & 1 deletion cmd/vclusterctl/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (cmd *CreateCmd) Run(ctx context.Context, args []string) error {

if config.ShouldCheckForProFeatures() && cfg.IsProFeatureEnabled() {
cmd.log.Warnf("In order to use a Pro feature, please contact us at https://www.vcluster.com/pro-demo or downgrade by running `vcluster upgrade --version v0.19.5`")
os.Exit(0)
os.Exit(1)
}

// TODO(johannesfrey): We would also need to validate here if the user is about to perform changes which would lead to distro/store changes
Expand Down
2 changes: 1 addition & 1 deletion cmd/vclusterctl/cmd/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ vcluster import my-vcluster --cluster connected-cluster \
RunE: func(cobraCmd *cobra.Command, args []string) error {
if config.ShouldCheckForProFeatures() {
cmd.Log.Warnf("In order to use a Pro feature, please contact us at https://www.vcluster.com/pro-demo or downgrade by running `vcluster upgrade --version v0.19.5`")
os.Exit(0)
os.Exit(1)
}

proClient, err := procli.CreateProClient()
Expand Down
2 changes: 1 addition & 1 deletion cmd/vclusterctl/cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ vcluster login https://my-vcluster-pro.com --access-key myaccesskey
RunE: func(cobraCmd *cobra.Command, args []string) error {
if config.ShouldCheckForProFeatures() {
cmd.Log.Warnf("In order to use a Pro feature, please contact us at https://www.vcluster.com/pro-demo or downgrade by running `vcluster upgrade --version v0.19.5`")
os.Exit(0)
os.Exit(1)
}

return cmd.RunLogin(cobraCmd.Context(), args)
Expand Down
2 changes: 1 addition & 1 deletion cmd/vclusterctl/cmd/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ vcluster logout
RunE: func(cobraCmd *cobra.Command, args []string) error {
if config.ShouldCheckForProFeatures() {
cmd.Log.Warnf("In order to use a Pro feature, please contact us at https://www.vcluster.com/pro-demo or downgrade by running `vcluster upgrade --version v0.19.5`")
os.Exit(0)
os.Exit(1)
}

_, err := procli.CreateProClient()
Expand Down
2 changes: 1 addition & 1 deletion cmd/vclusterctl/cmd/pro/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ before running this command:
func (cmd *StartCmd) Run(ctx context.Context) error {
if config.ShouldCheckForProFeatures() {
cmd.Log.Warnf("In order to use a Pro feature, please contact us at https://www.vcluster.com/pro-demo or downgrade by running `vcluster upgrade --version v0.19.5`")
os.Exit(0)
os.Exit(1)
}

// get version to deploy
Expand Down
2 changes: 1 addition & 1 deletion cmd/vclusterctl/cmd/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ vcluster ui
RunE: func(cobraCmd *cobra.Command, args []string) error {
if config.ShouldCheckForProFeatures() {
cmd.Log.Warnf("In order to use a Pro feature, please contact us at https://www.vcluster.com/pro-demo or downgrade by running `vcluster upgrade --version v0.19.5`")
os.Exit(0)
os.Exit(1)
}

err := cmd.Run(cobraCmd.Context(), args)
Expand Down
Loading