Skip to content

Commit

Permalink
allow disabling 'current' version directory with NO_JUNCTIONS config …
Browse files Browse the repository at this point in the history
…setting (see #1202)
  • Loading branch information
lukesampson committed Jan 9, 2017
1 parent 6985974 commit a14ffdb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand All @@ -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) {
Expand Down

0 comments on commit a14ffdb

Please sign in to comment.