From db49f10cadd4cf3622f9c5e300cbbb07e48676c7 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Fri, 3 Feb 2017 23:15:18 -0800 Subject: [PATCH] update changelog --- CHANGELOG.md | 1 + template/interpolate/funcs.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b44748a8..49ab5b1c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ * builder/amazon-ebsvolume: Fix interpolation of block_device. [GH-4464] * builder/vmware: ESXi: VNC port timeout increased to 5 s. [GH-4480] * core: always check for an error first when walking a path. [GH-4467] +* builder/virtualbox: remove guest additions before saving image. [GH-4496] ## 0.12.2 (January 20, 2017) diff --git a/template/interpolate/funcs.go b/template/interpolate/funcs.go index 92c3ce5c4..1244a55fc 100644 --- a/template/interpolate/funcs.go +++ b/template/interpolate/funcs.go @@ -138,12 +138,12 @@ func funcGenTimestamp(ctx *Context) interface{} { } func funcGenUser(ctx *Context) interface{} { - return func(k string) string { + return func(k string) (string, error) { if ctx == nil || ctx.UserVariables == nil { - return "" + return "", errors.New("test") } - return ctx.UserVariables[k] + return ctx.UserVariables[k], nil } }