From 4f9ccdd70f69dd0a879329d57ec21588f29f182c Mon Sep 17 00:00:00 2001 From: bas-vk Date: Sun, 11 Dec 2016 00:01:57 +0100 Subject: build: safe update of PATH on Windows (#3419) NSIS has a default MAX_STR_LEN of 1024. If $ENV{PATH} is longer the returned string is truncated to an empty string. Its then not possible to distinguis between the variable not set or too long. As a result the variable is set with the location where geth and/or dev tools are installed. This may override any previous set values. --- build/nsis.install.nsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'build/nsis.install.nsh') diff --git a/build/nsis.install.nsh b/build/nsis.install.nsh index f9ad8e95e..57ef5a37c 100644 --- a/build/nsis.install.nsh +++ b/build/nsis.install.nsh @@ -37,8 +37,9 @@ Section "Geth" GETH_IDX ${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc" ${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "A" "HKLM" "\\.\pipe\geth.ipc" - # Add geth to PATH - ${EnvVarUpdate} $0 "PATH" "A" "HKLM" $INSTDIR + # Add instdir to PATH + Push "$INSTDIR" + Call AddToPath SectionEnd # Install optional develop tools. -- cgit v1.2.3