Skip to content

Commit

Permalink
added support for adding supported attrs to trasform in runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
jformacek committed Mar 28, 2024
1 parent f8d0993 commit cedb4af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion S.DS.P.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = '.\S.DS.P.psm1'

# Version number of this module.
ModuleVersion = '2.1.7'
ModuleVersion = '2.1.8'

# ID used to uniquely identify this module
GUID = '766cbbc0-85b9-4773-b4db-2fa86cd771ff'
Expand Down
7 changes: 5 additions & 2 deletions S.DS.P.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,10 @@ Template for creation of new transforms: https://github.com/jformacek/S.DS.P/blo
[Parameter(Mandatory,ValueFromPipeline,ParameterSetName='TransformFilePath', Position=0)]
[string]
#Full path to transform file
$TransformFile
$TransformFile,
[switch]
#Force registration of transform, even if the attribute is not contained in the list of supported attributes
$Force
)

Process
Expand Down Expand Up @@ -1547,7 +1550,7 @@ Template for creation of new transforms: https://github.com/jformacek/S.DS.P/blo
}
else
{
if($supportedAttributes -contains $AttributeName)
if(($supportedAttributes -contains $AttributeName) -or $Force)
{
$attribs = @($AttributeName)
}
Expand Down

0 comments on commit cedb4af

Please sign in to comment.