You've already forked sap-jenkins-library
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:
@@ -19,7 +19,7 @@ func FileExists(filename string) bool {
|
|||||||
func Copy(src, dst string) (int64, error) {
|
func Copy(src, dst string) (int64, error) {
|
||||||
|
|
||||||
if !FileExists(src) {
|
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)
|
source, err := os.Open(src)
|
||||||
|
|||||||
Reference in New Issue
Block a user