@@ -153,7 +153,8 @@ func (e *Execer) runShellExecutable(ctx context.Context, out *spec) error {
153153 script := fmt .Sprintf (
154154 "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; %s" , path )
155155 cmd := exec .Command ("pwsh" , "-Command" , script )
156- return runCmds (ctx , []* exec.Cmd {cmd }, e .Environ , e .Workdir , e .Stdout , e .Stderr )
156+ envWithClonePath := append (e .Environ , fmt .Sprintf ("CLONE_CACHE_PATH=%s" , e .Source ))
157+ return runCmds (ctx , []* exec.Cmd {cmd }, envWithClonePath , e .Workdir , e .Stdout , e .Stderr )
157158 case "linux" , "darwin" :
158159 path := filepath .Join (e .Source , out .Run .Bash .Path )
159160
@@ -166,7 +167,8 @@ func (e *Execer) runShellExecutable(ctx context.Context, out *spec) error {
166167 slog .Debug ("execute" , slog .String ("file" , path ))
167168
168169 cmd := exec .Command (shell , path )
169- return runCmds (ctx , []* exec.Cmd {cmd }, e .Environ , e .Workdir , e .Stdout , e .Stderr )
170+ envWithClonePath := append (e .Environ , fmt .Sprintf ("CLONE_CACHE_PATH=%s" , e .Source ))
171+ return runCmds (ctx , []* exec.Cmd {cmd }, envWithClonePath , e .Workdir , e .Stdout , e .Stderr )
170172 default :
171173 return fmt .Errorf ("unsupported operating system: %s" , runtime .GOOS )
172174 }
0 commit comments