1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-11-06 09:09:19 +02:00

[fix] Don't forget to return the error instead of only creating an error (#1054)

This commit is contained in:
Marcus Holl
2019-12-11 08:17:16 +01:00
committed by GitHub
parent 1d2ed5e021
commit 3f3db13a8a

View File

@@ -19,7 +19,7 @@ func FileExists(filename string) bool {
func Copy(src, dst string) (int64, error) {
if !FileExists(src) {
errors.New("Source file '" + src + "' does not exist")
return 0, errors.New("Source file '" + src + "' does not exist")
}
source, err := os.Open(src)