mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-30 04:10:32 +00:00
Fix CI_WORKSPACE
in local backend (#2627)
closes https://github.com/woodpecker-ci/woodpecker/issues/2610
This commit is contained in:
parent
7cbbedbc06
commit
efbde332a3
3 changed files with 3 additions and 3 deletions
|
@ -84,8 +84,6 @@ func (e *local) execClone(ctx context.Context, step *types.Step, state *workflow
|
|||
return err
|
||||
}
|
||||
|
||||
env = append(env, "CI_WORKSPACE="+state.workspaceDir)
|
||||
|
||||
// Prepare command
|
||||
var cmd *exec.Cmd
|
||||
if rmCmd != "" {
|
||||
|
|
|
@ -27,6 +27,7 @@ var notAllowedEnvVarOverwrites = []string{
|
|||
"CI_SCRIPT",
|
||||
"HOME",
|
||||
"SHELL",
|
||||
"CI_WORKSPACE",
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -112,9 +112,10 @@ func (e *local) StartStep(ctx context.Context, step *types.Step, taskUUID string
|
|||
}
|
||||
}
|
||||
|
||||
// Set HOME
|
||||
// Set HOME and CI_WORKSPACE
|
||||
env = append(env, "HOME="+state.homeDir)
|
||||
env = append(env, "USERPROFILE="+state.homeDir)
|
||||
env = append(env, "CI_WORKSPACE="+state.workspaceDir)
|
||||
|
||||
switch step.Type {
|
||||
case types.StepTypeClone:
|
||||
|
|
Loading…
Reference in a new issue