aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/keyringer/functions10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index d474666..96ca7e6 100644
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -171,6 +171,11 @@ function keyringer_set_env {
RECIPIENTS="$BASEDIR/config/recipients"
OPTIONS="$BASEDIR/config/options"
+ if [ -z "$BASEDIR" ]; then
+ keyringer_action_usage
+ exit 1
+ fi
+
if [ ! -f "$RECIPIENTS" ]; then
echo "No recipient config was found"
exit 1
@@ -180,6 +185,11 @@ function keyringer_set_env {
echo "You have to set EDITOR env variable"
exit 1
fi
+
+ if [ ! -f "$OPTIONS" ]; then
+ echo "No option config was found"
+ exit 1
+ fi
}
# Get a single argument