Skip to content

Commit

Permalink
fix: Use a Out-String cmdlet to force exports to be string type (#121)
Browse files Browse the repository at this point in the history
* Use a `Out-String` cmdlet to force exports to be string type

* Update starbase_shell__shells__pwsh__tests__formats_cd_hook.snap
  • Loading branch information
Lutra-Fs authored Jan 7, 2025
1 parent e2a6dc6 commit 337a86f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/shell/src/shells/pwsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ $origPath = [Environment]::GetEnvironmentVariable('PATH')
function {function} {{
$exports = {command};
if ($exports) {{
Invoke-Expression -Command $exports;
$exports | Out-String | Invoke-Expression;
}}
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $origPath = [Environment]::GetEnvironmentVariable('PATH')
function _starbase_hook {
$exports = starbase hook pwsh;
if ($exports) {
Invoke-Expression -Command $exports;
$exports | Out-String | Invoke-Expression;
}
}

Expand Down

0 comments on commit 337a86f

Please sign in to comment.