Skip to content

Pipe script fixes #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Github/Actions/PipeScriptAction.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $PSD1Found = Get-ChildItem -Recurse -Filter "*.psd1" | Where-Object Name -eq 'Pi

if ($PSD1Found) {
$PipeScriptModulePath = $PSD1Found
Import-Module $psd1Path -Force -PassThru | Out-Host
Import-Module $PSD1Found -Force -PassThru | Out-Host
} elseif ($env:GITHUB_ACTION_PATH) {
$PipeScriptModulePath = Join-Path $env:GITHUB_ACTION_PATH 'PipeScript.psd1'
if (Test-path $PipeScriptModulePath) {
Expand Down
2 changes: 2 additions & 0 deletions PipeScript.ps1.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ foreach ($transpilerCmd in Get-Transpiler) {
Set-Alias ".<$($transpilerCmd.DisplayName)>" Use-PipeScript
}

$MyModule = $MyInvocation.MyCommand.ScriptBlock.Module
foreach ($cmd in $ExecutionContext.SessionState.InvokeCommand.GetCommands('*','Function', $true)) {
if ($cmd.ScriptBlock.Module -ne $MyModule) { continue }
if ($cmd.ScriptBlock.Attributes.AliasNames) {
$aliasNames += $cmd.ScriptBlock.Attributes.AliasNames
}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ runs:

if ($PSD1Found) {
$PipeScriptModulePath = $PSD1Found
Import-Module $psd1Path -Force -PassThru | Out-Host
Import-Module $PSD1Found -Force -PassThru | Out-Host
} elseif ($env:GITHUB_ACTION_PATH) {
$PipeScriptModulePath = Join-Path $env:GITHUB_ACTION_PATH 'PipeScript.psd1'
if (Test-path $PipeScriptModulePath) {
Expand Down