1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

Fix CI_WORKSPACE in local backend (#2627)

closes https://github.com/woodpecker-ci/woodpecker/issues/2610
This commit is contained in:
qwerty287 2023-10-23 12:54:10 +02:00 committed by GitHub
parent 7cbbedbc06
commit efbde332a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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 != "" {

View File

@ -27,6 +27,7 @@ var notAllowedEnvVarOverwrites = []string{
"CI_SCRIPT",
"HOME",
"SHELL",
"CI_WORKSPACE",
}
var (

View File

@ -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: