Skip to content

Commit

Permalink
feat: PipeScript.Languages.ExcludePath ( Fixes #877 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Jan 12, 2024
1 parent 0155e19 commit 93e107e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Types/PipeScript.Languages/get_ExcludePath.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<#
.SYNOPSIS
Gets Excluded Paths for all languages.
.DESCRIPTION
Gets any excluded paths for interpreted languages in PipeScript.
If a command is like any of these paths, it should not be interpreted.
#>
param()

if ($null -eq $this.'.ExcludePath'.Length) {
Add-Member -InputObject $this -Force -MemberType NoteProperty -Name '.ExcludePath' @()
}

return $this.'.ExcludePath'
15 changes: 15 additions & 0 deletions Types/PipeScript.Languages/set_ExcludePath.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<#
.SYNOPSIS
Changes the Exclusion Paths
.DESCRIPTION
Sets any excluded paths for interpreted languages in PipeScript.
If a command matches any of these patterns, it should not be interpreted.
.NOTES
Excluded paths will be processed as wildcards.
#>
$paths = @(foreach ($arg in $args | . { process { $_ }}) {
"$arg"
})

Add-Member -InputObject $this -Force -MemberType NoteProperty -Name '.ExcludePath' -Value $paths

0 comments on commit 93e107e

Please sign in to comment.