Project

General

Profile

« Previous | Next » 

Revision 9331

bugfix: lib/sh/local.sh: add a manual errexit for $() exprs by embedding them in just a var assignment (without local or declare), whose exit status will then equal the of the $(). a `|| return` also needs to be added because errexit does not work on assignment statements. this commit adds them for func_loc(), echo_func(), canon_rel_path(), set_paths(), save_cache, cached realpath(), local.sh global vars

View differences:

local.sh
5 5

  
6 6
if self_not_included; then
7 7

  
8
root_dir="$(canon_rel_path "$(dirname "${BASH_SOURCE[0]}")"/../..)"
8
root_dir="$(canon_rel_path "$(dirname "${BASH_SOURCE[0]}")"/../..)" || return
9 9
bin_dir="$root_dir"/bin
10
bin_dir_abs="$(realpath "$bin_dir")"
10
bin_dir_abs="$(realpath "$bin_dir")" || return
11 11

  
12 12
export PATH="$bin_dir_abs:$PATH"
13 13

  

Also available in: Unified diff