From 93cea206a6cf4dc3fae12da34a43b794116b84b8 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Thu, 3 Dec 2020 18:34:05 +0100 Subject: [PATCH] [bash] disable shellcheck warnings on macOS PATH fix SC2123 warns that the PATH variable is being manipulated, but this is exactly the intention here. SC1091 warns that /etc/profile cannot be checked. This is fine, as this file is provided by the platform and there is no need to check it here. --- roles/bash/files/profile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/bash/files/profile b/roles/bash/files/profile index 2902389..24b80c8 100644 --- a/roles/bash/files/profile +++ b/roles/bash/files/profile @@ -35,6 +35,8 @@ export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' # Prevent path_helper from messing with the PATH when starting tmux. # See: https://superuser.com/a/583502 +# shellcheck disable=SC2123 # PATH is being intentionally manipulated here. +# shellcheck disable=SC1091 # /etc/profile is provided by macOS. [ "$(uname)" == "Darwin" ] && { PATH=""; source /etc/profile; } prepend_dir() { # 1: dir to add, 2: variable to manipulate