Review fixes

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
Justin Terry (VM)
2018-10-01 09:02:19 -07:00
parent 2ddbb2db05
commit beb1f432be
2 changed files with 7 additions and 8 deletions

View File

@@ -110,13 +110,12 @@ func (b *binary) Start(ctx context.Context) (_ *shim, err error) {
func (b *binary) Delete(ctx context.Context) (*runtime.Exit, error) {
log.G(ctx).Info("cleaning up dead shim")
// Windows cannot delete the current working directory while an
// executable is in use with it. For the cleanup case we invoke with the
// default work dir and forward the bundle path on the cmdline.
var bundlePath string
if gruntime.GOOS == "windows" {
// Windows cannot delete the current working directory while an
// executable is in use with it. For the cleanup case we invoke with the
// deafult work dir and forward the bundle path on the cmdline.
bundlePath = ""
} else {
if gruntime.GOOS != "windows" {
bundlePath = b.bundle.Path
}