mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-09-03 03:56:28 +00:00
allow disabling 'current' version directory with NO_JUNCTIONS config setting (see #1202)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user