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:
parent
7cbbedbc06
commit
efbde332a3
@ -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 New Issue
Block a user