diff options
Diffstat (limited to 'libexec/app-resolver-file')
-rwxr-xr-x | libexec/app-resolver-file | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libexec/app-resolver-file b/libexec/app-resolver-file index 5aedf88..2b708e8 100755 --- a/libexec/app-resolver-file +++ b/libexec/app-resolver-file @@ -3,7 +3,7 @@ set -e set -u -APPSH_HOME=$(cd $(dirname "$0")/.. && pwd) +export APPSH_HOME=$(cd $(dirname "$0")/.. && pwd) . $APPSH_HOME/lib/common # HEADER END @@ -31,7 +31,12 @@ init() { local file=${1-} - if [[ ! -r "$file" ]] + if [[ ! $file =~ ^/ ]] + then + fatal "The file's path must be absolute." + fi + + if [[ ! -r $file ]] then fatal "Can't read file: $file" fi |