Readd ui as arg to host cap

This commit is contained in:
sophia 2021-06-14 17:09:41 -05:00 committed by Paul Hinze
parent 9ebd62b37a
commit 908b1e3449
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -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
}