Skip to content

Commit 278e781

Browse files
committed
Fix missing parameter
Fix missing scope parameter. Fix missing calculation logic
1 parent 84aebee commit 278e781

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

templates/PSFProject/install.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
1717
.PARAMETER UserMode
1818
The downloaded module will be moved to the user profile, rather than program files.
19+
20+
.PARAMETER Scope
21+
By default, the downloaded module will be moved to program files.
22+
Setting this to 'CurrentUser' installs to the userprofile of the current user.
1923
2024
.PARAMETER Force
2125
The install script will overwrite an existing module.
@@ -28,6 +32,10 @@ Param (
2832
[switch]
2933
$UserMode,
3034

35+
[ValidateSet('AllUsers', 'CurrentUser')]
36+
[string]
37+
$Scope = "AllUsers",
38+
3139
[switch]
3240
$Force
3341
)
@@ -43,6 +51,15 @@ $BaseUrl = "https://github.com/<InsertUsernameHere>/þnameþ"
4351
$SubFolder = "þnameþ"
4452
#endregion Configuration for cloning script
4553

54+
#region Parameter Calculation
55+
$doUserMode = $false
56+
if ($UserMode) { $doUserMode = $true }
57+
if ($install_CurrentUser) { $doUserMode = $true }
58+
if ($Scope -eq 'CurrentUser') { $doUserMode = $true }
59+
60+
if ($install_Branch) { $Branch = $install_Branch }
61+
#endregion Parameter Calculation
62+
4663
#region Utility Functions
4764
function Compress-Archive
4865
{

0 commit comments

Comments
 (0)