From d5adde1eeb13ba377f7c05b9f21893c01f61ec16 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 7 May 2017 22:15:01 +0200 Subject: exitcodes: pull all exit code definitions into the package This commit defines all exit codes in one place in the exitcodes package. Also, it adds a test to verify the exit code on incorrect password, which is what SiriKali cares about the most. Fixes https://github.com/rfjakob/gocryptfs/issues/77 . --- internal/stupidgcm/without_openssl.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/stupidgcm') diff --git a/internal/stupidgcm/without_openssl.go b/internal/stupidgcm/without_openssl.go index 1c6ebcf..efd37f3 100644 --- a/internal/stupidgcm/without_openssl.go +++ b/internal/stupidgcm/without_openssl.go @@ -5,6 +5,8 @@ package stupidgcm import ( "fmt" "os" + + "github.com/rfjakob/gocryptfs/internal/exitcodes" ) type stupidGCM struct{} @@ -16,7 +18,7 @@ const ( func errExit() { fmt.Fprintln(os.Stderr, "gocryptfs has been compiled without openssl support but you are still trying to use openssl") - os.Exit(2) + os.Exit(exitcodes.OpenSSL) } func New(_ []byte, _ bool) stupidGCM { -- cgit v1.2.3