diff --git a/src/tools/gxpkg.ss b/src/tools/gxpkg.ss index b9082d528..394a6907c 100644 --- a/src/tools/gxpkg.ss +++ b/src/tools/gxpkg.ss @@ -44,6 +44,12 @@ pkg-retag pkg-plist pkg-dependents pkg-dependents*) +;; TODO: move that to general-purpose runtime support, and +;; have it throw an exception that is caught by the bottom runtime handler. +(def (abort msg) + (eprintf "~a\n" msg) + (exit 2)) + (def (main . args) (def local-flag (flag 'local "-l" "--local" @@ -342,8 +348,7 @@ (def (pkg-new package-prefix package-name maybe-link) (def prefix (or package-prefix (getenv "USER" #f) - (begin (eprintf "Package prefix not specified with -p or --package, and USER not defined\n") - (exit 2)))) + (abort "Package prefix not specified with -p or --package, and USER not defined"))) (def name (or package-name (path-strip-directory (path-normalize* (current-directory))))) (def (create-template file template . args)