mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-08-11 19:22:39 +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
@ -84,8 +84,6 @@ func (e *local) execClone(ctx context.Context, step *types.Step, state *workflow
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
env = append(env, "CI_WORKSPACE="+state.workspaceDir)
|
|
||||||
|
|
||||||
// Prepare command
|
// Prepare command
|
||||||
var cmd *exec.Cmd
|
var cmd *exec.Cmd
|
||||||
if rmCmd != "" {
|
if rmCmd != "" {
|
||||||
|
@ -27,6 +27,7 @@ var notAllowedEnvVarOverwrites = []string{
|
|||||||
"CI_SCRIPT",
|
"CI_SCRIPT",
|
||||||
"HOME",
|
"HOME",
|
||||||
"SHELL",
|
"SHELL",
|
||||||
|
"CI_WORKSPACE",
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
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, "HOME="+state.homeDir)
|
||||||
env = append(env, "USERPROFILE="+state.homeDir)
|
env = append(env, "USERPROFILE="+state.homeDir)
|
||||||
|
env = append(env, "CI_WORKSPACE="+state.workspaceDir)
|
||||||
|
|
||||||
switch step.Type {
|
switch step.Type {
|
||||||
case types.StepTypeClone:
|
case types.StepTypeClone:
|
||||||
|
Loading…
Reference in New Issue
Block a user