From 908b1e3449165214f9601bea16f4557764b10424 Mon Sep 17 00:00:00 2001 From: sophia Date: Mon, 14 Jun 2021 17:09:41 -0500 Subject: [PATCH] Readd ui as arg to host cap --- builtin/myplugin/host/cap/write_hello.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/builtin/myplugin/host/cap/write_hello.go b/builtin/myplugin/host/cap/write_hello.go index e8ea434b3..b60dd4b91 100644 --- a/builtin/myplugin/host/cap/write_hello.go +++ b/builtin/myplugin/host/cap/write_hello.go @@ -2,11 +2,14 @@ package cap import ( "io/ioutil" - // "github.com/hashicorp/vagrant-plugin-sdk/terminal" + + "github.com/hashicorp/vagrant-plugin-sdk/terminal" ) -func WriteHello() error { - data := []byte("Hello from the write hello capability, compliments of the AlwaysTrue Host") +func WriteHello(ui terminal.UI) error { + msg := "Hello from the write hello capability, compliments of the AlwaysTrue Host" + ui.Output(msg) + data := []byte(msg) ioutil.WriteFile("/tmp/hello", data, 0644) return nil }