diff --git a/lib/main.go b/lib/main.go index 30d13be..de8cc47 100644 --- a/lib/main.go +++ b/lib/main.go @@ -120,6 +120,8 @@ var ErrBuildEPKTargetRootError = errors.New("error creating target root") var ErrBuildEPKExecutingBuildShError = errors.New("error executing build.sh") var ErrBuildEPKCountingFilesError = errors.New("error counting files") var ErrBuildEPKBadBuildType = errors.New("bad build type") +var ErrBuildEPKDirectoryDoesNotExist = errors.New("required directory does not exist") +var ErrBubbleWrapInsufficientPermissions = errors.New("bwrap does not have the necessary permissions") // BuildEPK builds the EPK package into a build directory func BuildEPK(projectDir string, inMemory bool, buildConfig Build, logger *Logger) (int64, string, error, error) { @@ -226,7 +228,7 @@ func BuildEPK(projectDir string, inMemory bool, buildConfig Build, logger *Logge Content: "Directory does not exist: " + dir, Prompt: false, }) - return 0, tempDir, err, errors.New("required directory does not exist: " + dir) + return 0, tempDir, err, ErrBuildEPKDirectoryDoesNotExist } } @@ -254,7 +256,7 @@ func BuildEPK(projectDir string, inMemory bool, buildConfig Build, logger *Logge Content: "bwrap is not available or does not have the necessary permissions", Prompt: false, }) - return 0, tempDir, err, errors.New("bwrap is not available or does not have the necessary permissions") + return 0, tempDir, err, ErrBubbleWrapInsufficientPermissions } arguments := []string{