From a14ffdb588fc056dcbe7e23ea130dfb4af92b7fe Mon Sep 17 00:00:00 2001 From: Luke Sampson Date: Tue, 10 Jan 2017 08:47:08 +1100 Subject: [PATCH] allow disabling 'current' version directory with NO_JUNCTIONS config setting (see #1202) --- lib/install.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/install.ps1 b/lib/install.ps1 index 8cb6fc45..00194ddc 100644 --- a/lib/install.ps1 +++ b/lib/install.ps1 @@ -614,6 +614,8 @@ function current_dir($versiondir) { # Returns the 'current' junction directory if in use, otherwise # the version directory. function link_current($versiondir) { + if(get_config NO_JUNCTIONS) { return $versiondir } + $currentdir = current_dir $versiondir write-host "linking $(friendly_path $currentdir) => $(friendly_path $versiondir)" @@ -637,6 +639,7 @@ function link_current($versiondir) { # Returns the 'current' junction directory (if it exists), # otherwise the normal version directory. function unlink_current($versiondir) { + if(get_config NO_JUNCTIONS) { return $versiondir } $currentdir = current_dir $versiondir if(test-path $currentdir) {