add support for dynamic parameters
This commit is contained in:
@@ -29,6 +29,8 @@ taskx BuildManifest @{
|
||||
$fingerprint = foreach ($command in $commands)
|
||||
{
|
||||
foreach ($parameter in $command.Parameters.Keys)
|
||||
{
|
||||
if($false -eq $command.Parameters[$parameter].IsDynamic)
|
||||
{
|
||||
'{0}:{1}' -f $command.Name, $command.Parameters[$parameter].Name
|
||||
foreach ($alias in $command.Parameters[$parameter].Aliases)
|
||||
@@ -37,6 +39,7 @@ taskx BuildManifest @{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$fingerprint = $fingerprint | Sort-Object
|
||||
|
||||
|
||||
@@ -8,10 +8,11 @@ task ImportDevModule {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Get-Module -Name $ModuleName)
|
||||
$loaded = Get-Module -Name $ModuleName -All
|
||||
if ($loaded)
|
||||
{
|
||||
"Unloading Module [$ModuleName] from a previous import..."
|
||||
Remove-Module -Name $ModuleName
|
||||
$loaded | Remove-Module -Force
|
||||
}
|
||||
|
||||
"Importing Module [$ModuleName] from [$Source\$ModuleName.psd1]..."
|
||||
|
||||
@@ -7,10 +7,11 @@ task ImportModule {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Get-Module -Name $ModuleName)
|
||||
$loaded = Get-Module -Name $ModuleName -All
|
||||
if ($loaded)
|
||||
{
|
||||
"Unloading Module [$ModuleName] from a previous import..."
|
||||
Remove-Module -Name $ModuleName
|
||||
$loaded | Remove-Module -Force
|
||||
}
|
||||
|
||||
"Importing Module [$ModuleName] from [$ManifestPath]..."
|
||||
|
||||
Reference in New Issue
Block a user