Merge pull request #329 from hashicorp/warn-compatability

Warn compatability
This commit is contained in:
Sophia Castellarin 2022-07-28 11:57:49 -05:00 committed by GitHub
commit 87689f5f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"io"
"os"
"regexp"
"strconv"
"strings"
@ -187,6 +188,22 @@ func BaseCommand(ctx context.Context, log hclog.Logger, logOutput io.Writer, opt
}
bc.ui = ui
outputExperimentalWarning := true
if val, ok := os.LookupEnv("VAGRANT_SUPPRESS_GO_EXPERIMENTAL_WARNING"); ok {
if v, err := strconv.ParseBool(val); err == nil && v {
outputExperimentalWarning = false
}
}
if outputExperimentalWarning {
ui.Output(`
This is an experimental version of Vagrant. Please note that some things may
not work as you expect and this version of Vagrant is not compatible with the
stable version of Vagrant. For more information about vagrant-go read the docs
at https://www.vagrantup.com/docs/experimental/vagrant_go. To disable this
warning set the environment variable 'VAGRANT_SUPPRESS_GO_EXPERIMENTAL_WARNING'.
`)
}
homeConfigPath, err := paths.NamedVagrantConfig(bc.flagBasis)
if err != nil {
return nil, err

View File

@ -289,6 +289,11 @@ Vagrant will default to using a system provided `ssh` on Windows. This
environment variable can also be used to disable that behavior to force Vagrant to
use the embedded `ssh` executable by setting it to `0`.
## `VAGRANT_SUPPRESS_GO_EXPERIMENTAL_WARNING`
If this is set, Vagrant-go will not output a warning message about compatibility
with Vagrant-ruby. This does not effect the stable Ruby release of Vagrant.
## `VAGRANT_WINCURL_DISABLE`
If set Vagrant will use the mingw build of curl which uses the installer provided