diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-02 14:28:37 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-02 14:28:37 +0300 |
commit | 65bfbc1fb54850275d4e9842ef2bd333d2081af4 (patch) | |
tree | cd38ddc1ad1abf3d930bd769a7154a13da161b02 /src/path.sh | |
parent | test: add a test case (diff) | |
download | config-links-65bfbc1fb54850275d4e9842ef2bd333d2081af4.tar.gz config-links-65bfbc1fb54850275d4e9842ef2bd333d2081af4.zip |
bash best practices & linting
Diffstat (limited to '')
-rw-r--r-- | src/path.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path.sh b/src/path.sh index bf52a6f..8ac71a9 100644 --- a/src/path.sh +++ b/src/path.sh @@ -76,7 +76,7 @@ traverse_path() { local -a abs_paths=() local path - while IFS= read -d '' -r path; do + readlink -z --canonicalize-missing -- ${paths[@]+"${paths[@]}"} | while IFS= read -d '' -r path; do if [ -n "$must_exist" ] && [ ! -e "$path" ]; then dump "must exist: $path" >&2 return 1 @@ -88,7 +88,7 @@ traverse_path() { fi abs_paths+=("$path") - done < <( readlink -z --canonicalize-missing -- ${paths[@]+"${paths[@]}"} ) + done printf -- "$fmt" ${abs_paths[@]+"${abs_paths[@]}"} } |