From d8db4917a325903a2a913683aa44a98382db8451 Mon Sep 17 00:00:00 2001 From: aymerici Date: Thu, 16 Aug 2018 14:20:19 +0200 Subject: [PATCH] linux doesn't support negative exit codes, replacing all of them to positive exit codes --- jbinary.go | 8 ++++---- version.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jbinary.go b/jbinary.go index 8d3ccf8..9d10ffe 100644 --- a/jbinary.go +++ b/jbinary.go @@ -63,18 +63,18 @@ func main() { fmt.Println("Generating golang source class") file, err := generateSource(tempWorkFolder) if err != nil { - exitWithError(err,-1) + exitWithError(err,1) } destDir := *flagDest err = os.MkdirAll(destDir, 0755) if err != nil { - exitWithError(err,-2) + exitWithError(err,2) } sourceFile :=path.Join(destDir, nameSourceFile) err = rename(file.Name(),sourceFile) if err != nil { - exitWithError(err,-3) + exitWithError(err,3) } extension := "bin" if strings.Compare(*flagPlatform,"windows")==0 { @@ -297,7 +297,7 @@ func DownloadFile(filepath string, url string) error { // Get the data resp, err := http.Get(url) if resp.StatusCode == 404 || resp.StatusCode == 409 { - exitWithError(errors.New(strings.Replace("URL Repository JRE not found: {url}","{url}",url,-1)),-4) + exitWithError(errors.New(strings.Replace("URL Repository JRE not found: {url}","{url}",url,-1)),4) } if err != nil { return err diff --git a/version.go b/version.go index a6abfe1..db6ecf7 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package main // Describe version. -const Version string = "0.0.5-ALPHA3" \ No newline at end of file +const Version string = "0.0.5-ALPHA4" \ No newline at end of file