From eef6e7d58fb86a6b6f8c9ae842b4ea9edeb4cf24 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Thu, 3 Dec 2020 18:34:17 +0100 Subject: [PATCH] [bash] fix shellcheck error SC2166 For details, see: https://github.com/koalaman/shellcheck/wiki/SC2166 --- roles/bash/files/profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/bash/files/profile b/roles/bash/files/profile index 24b80c8..8f802e3 100644 --- a/roles/bash/files/profile +++ b/roles/bash/files/profile @@ -40,7 +40,7 @@ export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' [ "$(uname)" == "Darwin" ] && { PATH=""; source /etc/profile; } prepend_dir() { # 1: dir to add, 2: variable to manipulate - [ -d "$1" -a -n "$2" ] || return + [ -d "$1" ] && [ -n "$2" ] || return local list="${!2}" # capture current value list=${list#"$1:"} # remove dir from beginning list=${list//":$1:"/:} # remove dir from middle