From ad17811c39cee21676f7291c973a4d0017f18b1b Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Tue, 27 Mar 2018 15:15:55 -0700 Subject: [PATCH] Update workdir to use default escape token --- pkg/commands/workdir.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/commands/workdir.go b/pkg/commands/workdir.go index 276abec22..f249608ac 100644 --- a/pkg/commands/workdir.go +++ b/pkg/commands/workdir.go @@ -23,7 +23,6 @@ import ( "github.com/sirupsen/logrus" "os" "path/filepath" - "strings" ) type WorkdirCommand struct { @@ -34,7 +33,7 @@ type WorkdirCommand struct { func (w *WorkdirCommand) ExecuteCommand(config *manifest.Schema2Config) error { logrus.Info("cmd: workdir") workdirPath := w.cmd.Path - resolvedWorkingDir, err := util.ResolveEnvironmentReplacement(w.workdirToString(), workdirPath, config.Env, true) + resolvedWorkingDir, err := util.ResolveEnvironmentReplacement(workdirPath, config.Env, true) if err != nil { return err } @@ -48,11 +47,6 @@ func (w *WorkdirCommand) ExecuteCommand(config *manifest.Schema2Config) error { return os.MkdirAll(config.WorkingDir, 0755) } -func (w *WorkdirCommand) workdirToString() string { - workdir := []string{"WORKDIR"} - return strings.Join(append(workdir, w.cmd.Path), " ") -} - // FilesToSnapshot returns the workingdir, which should have been created if it didn't already exist func (w *WorkdirCommand) FilesToSnapshot() []string { return w.snapshotFiles