Skip to content

Commit

Permalink
Clarify air gap bundle warning (#1524)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajp-io authored Nov 19, 2024
1 parent 3d9d9a8 commit e9e5cc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,9 +774,9 @@ func installCommand() *cli.Command {
if channelRelease, err := release.GetChannelRelease(); err != nil {
return fmt.Errorf("unable to read channel release data: %w", err)
} else if channelRelease != nil && channelRelease.Airgap && c.String("airgap-bundle") == "" && !c.Bool("no-prompt") {
logrus.Warnf("You downloaded an air gap bundle but are performing an online installation.")
logrus.Infof("To do an air gap installation, pass the air gap bundle with --airgap-bundle.")
if !prompts.New().Confirm("Do you want to proceed with an online installation?", false) {
logrus.Warnf("You downloaded an air gap bundle but didn't provide it with --airgap-bundle.")
logrus.Warnf("If you continue, the installation will not use an air gap bundle and will connect to the internet.")
if !prompts.New().Confirm("Are you sure you want to install without an air gap bundle?", false) {
return ErrNothingElseToAdd
}
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -945,9 +945,9 @@ func restoreCommand() *cli.Command {
if channelRelease, err := release.GetChannelRelease(); err != nil {
return fmt.Errorf("unable to read channel release data: %w", err)
} else if channelRelease != nil && channelRelease.Airgap && c.String("airgap-bundle") == "" && !c.Bool("no-prompt") {
logrus.Infof("You downloaded an air gap bundle but are performing an online restore.")
logrus.Infof("To do an air gap restore, pass the air gap bundle with --airgap-bundle.")
if !prompts.New().Confirm("Do you want to proceed with an online restore?", false) {
logrus.Warnf("You downloaded an air gap bundle but didn't provide it with --airgap-bundle.")
logrus.Warnf("If you continue, the restore will not use an air gap bundle and will connect to the internet.")
if !prompts.New().Confirm("Are you sure you want to restore without an air gap bundle?", false) {
return ErrNothingElseToAdd
}
}
Expand Down

0 comments on commit e9e5cc6

Please sign in to comment.