Skip to content

Commit

Permalink
Merge pull request #2257 from will4j/feature/scripts-workdir
Browse files Browse the repository at this point in the history
feat: set CustomScriptTask workdir to remoteTaskHome
  • Loading branch information
ks-ci-bot committed May 27, 2024
2 parents f4053c8 + 12d1513 commit ebc211d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/kk/pkg/bootstrap/customscripts/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ func (t *CustomScriptTask) Execute(runtime connector.Runtime) error {
RunBash = "/bin/bash " + targetPath
}

cd_cmd := fmt.Sprintf("cd %s;", remoteTaskHome)
start := time.Now()
out, err := runtime.GetRunner().SudoCmd(RunBash, false)
out, err := runtime.GetRunner().SudoCmd(cd_cmd+RunBash, false)
if err != nil {
return errors.Errorf("Exec Bash: %s err:%s", RunBash, err)
}
Expand Down

0 comments on commit ebc211d

Please sign in to comment.