1
0
forked from JOJ/JOJ3

fix(executor/local): skip existing files

This commit is contained in:
张泊明518370910136 2024-11-28 14:17:46 -05:00
parent d0d9e0c0ce
commit d76270d1ba
Signed by untrusted user: 张泊明518370910136
GPG Key ID: D47306D7062CDA9D

View File

@ -100,6 +100,9 @@ func (e *Local) Run(cmds []stage.Cmd) ([]stage.ExecutorResult, error) {
// Helper function to handle copyOut files
func handleCopyOut(result *stage.ExecutorResult, cmd stage.Cmd) error {
for _, filename := range cmd.CopyOut {
if _, ok := result.Files[filename]; ok {
continue
}
optional := false
if strings.HasSuffix(filename, "?") {
optional = true