mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
stdenv: ignore duplicates in addToSearchPath (#113800)
This commit is contained in:
parent
86d56f10fc
commit
6ba632c2a4
@ -157,7 +157,8 @@ addToSearchPathWithCustomDelimiter() {
|
||||
local delimiter="$1"
|
||||
local varName="$2"
|
||||
local dir="$3"
|
||||
if [ -d "$dir" ]; then
|
||||
if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" \
|
||||
!= *"${delimiter}${dir}${delimiter}"* ]]; then
|
||||
export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user