Skip to content

Commit c338e56

Browse files
committed
Updated ci.yml and paramter sets
1 parent eb64c10 commit c338e56

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/checkout@v4
1515

1616
- name: Setup PowerShell
17-
uses: PowerShell/PowerShell-For-GitHub-Actions@v2
17+
uses: actions/setup-powershell@v1
1818

1919
- name: Install dependencies
2020
run: |

‎Public/New-ModuleTemplate.ps1‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,22 @@
4141
function New-ModuleTemplate {
4242
[CmdletBinding(DefaultParameterSetName = "CLI")]
4343
param(
44-
[Parameter(Mandatory)]
44+
# Path belongs to BOTH parameter sets
45+
[Parameter(ParameterSetName = "CLI", Mandatory = $true)]
46+
[Parameter(ParameterSetName = "GUI", Mandatory = $true)]
4547
[string]$Path,
4648

49+
# Name belongs ONLY to CLI
4750
[Parameter(ParameterSetName = "CLI", Mandatory = $true)]
48-
[Parameter(ParameterSetName = "GUI")]
4951
[string]$Name,
5052

53+
# UseGui belongs ONLY to GUI
5154
[Parameter(ParameterSetName = "GUI", Mandatory = $true)]
5255
[switch]$UseGui,
5356

57+
# InitGit belongs to BOTH sets
58+
[Parameter(ParameterSetName = "CLI")]
59+
[Parameter(ParameterSetName = "GUI")]
5460
[switch]$InitGit
5561
)
5662

‎Tests/New-ModuleTemplate.Tests.ps1‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Describe "New-ModuleTemplate" {
44
$temp = Join-Path $env:TEMP ([guid]::NewGuid().ToString())
55
New-Item -ItemType Directory -Path $temp | Out-Null
66

7-
New-ModuleTemplate -Name "TestModule" -Path $temp
7+
New-ModuleTemplate -Path $temp -Name "TestModule"
88

99
$expected = @(
1010
"$temp\TestModule\Public",

0 commit comments

Comments
 (0)