From 85362faaedb9df7fa833aefb455ea4c90ee98dac Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 18 May 2022 17:04:24 -0500 Subject: [PATCH] Output deprecated message for --timestamp and --debug-timestamp flags --- internal/cli/main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/cli/main.go b/internal/cli/main.go index 0e4eeac61..6ff542790 100644 --- a/internal/cli/main.go +++ b/internal/cli/main.go @@ -18,6 +18,7 @@ import ( "github.com/mitchellh/go-glint" "github.com/hashicorp/vagrant-plugin-sdk/internal-shared/protomappers" + "github.com/hashicorp/vagrant-plugin-sdk/localizer" "github.com/hashicorp/vagrant-plugin-sdk/proto/vagrant_plugin_sdk" "github.com/hashicorp/vagrant-plugin-sdk/terminal" "github.com/hashicorp/vagrant/internal/pkg/signalcontext" @@ -288,14 +289,18 @@ func logger(args []string) ([]string, hclog.Logger, io.Writer, error) { } case "--timestamp": t := terminal.NonInteractiveUI(context.Background()) - t.Output("Deprecated") + t.Output( + localizer.LocalizeMsg("deprecated_flag", map[string]string{"Flag": "--timestamp"}), + ) case "--debug-timestamp": if level == hclog.NoLevel || level > hclog.Debug { level = hclog.Debug _ = os.Setenv("VAGRANT_LOG", "debug") } t := terminal.NonInteractiveUI(context.Background()) - t.Output("Deprecated") + t.Output( + localizer.LocalizeMsg("deprecated_flag", map[string]string{"Flag": "--debug-timestamp"}), + ) default: outArgs = append(outArgs, arg) }