1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-03-03 15:02:35 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)