Skip to content

Commit e21bfab

Browse files
committed
handle device files llike /dev/null properly
1 parent f1be0fc commit e21bfab

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

src/psij/launchers/scripts/launcher_lib.sh

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,12 @@ set -e
55
# Retrieved 2026-03-26, License - CC BY-SA 3.0
66

77
function _psi_j_abspath() {
8-
if [ -d "$1" ]; then
9-
# dir
10-
(cd "$1"; pwd)
11-
elif [ -f "$1" ]; then
12-
# file
13-
if [[ $1 = /* ]]; then
14-
echo "$1"
15-
elif [[ $1 == */* ]]; then
16-
echo "$(cd "${1%/*}"; pwd)/${1##*/}"
17-
else
18-
echo "$(pwd)/$1"
19-
fi
8+
if [[ $1 = /* ]]; then
9+
echo "$1"
10+
elif [[ $1 == */* ]]; then
11+
echo "$(cd "${1%/*}"; pwd)/${1##*/}"
12+
elif [ -n "$1" ]; then
13+
echo "$(pwd)/$1"
2014
fi
2115
}
2216

0 commit comments

Comments
 (0)