Skip to content

Commit

Permalink
fix: exit with 1 if upload contains error
Browse files Browse the repository at this point in the history
  • Loading branch information
fangbinwei committed Dec 13, 2020
1 parent df8d258 commit d381f81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"
"os"

"aliyun-oss-website-action/config"
"aliyun-oss-website-action/operation"
Expand All @@ -28,4 +29,9 @@ func main() {
_, uploadErrs := operation.UploadObjects(config.Folder, config.Bucket, records)
utils.LogErrors(uploadErrs)
fmt.Println("---- upload end ----")

if len(uploadErrs) > 0 {
os.Exit(1)
}

}

0 comments on commit d381f81

Please sign in to comment.