Skip to content

Commit 0183565

Browse files
author
James Brundage
committed
Adding PipeScript.Template (Fixes #315)
1 parent 6bea384 commit 0183565

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Types/PipeScript/get_Template.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
$potentialTemplatePaths =
2+
@(
3+
$this.Source -replace '\.ps1$', '.ps.ps1'
4+
$this.Source -replace '\.ps1$', '.ps1.ps1'
5+
)
6+
7+
foreach ($potentialTemplatePath in $potentialTemplatePaths ) {
8+
if (Test-Path $potentialTemplatePath) {
9+
return (Get-PipeScript -PipeScriptPath $potentialTemplatePath)
10+
}
11+
}
12+

0 commit comments

Comments
 (0)