Skip to content

Commit d7faf70

Browse files
feat: Show-Turtle ( Fixes #257 )
Will not show when not interactive or in a Github workflow
1 parent 20ecd17 commit d7faf70

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Commands/Show-Turtle.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function Show-Turtle
3131
process {
3232
# If we are not running interactively,
3333
# we obviously do not want to try to show something on the screen.
34-
if (-not [Environment]::UserInteractive) {
34+
if (-not [Environment]::UserInteractive -or $env:GITHUB_WORKFLOW) {
3535
# Instead, just pass thru our input.
3636
return $InputObject
3737
}

Turtle.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe Turtle {
7474
$dataBlockTurtle.Heading | Should -Be 45
7575
}
7676
it 'Will not show a turtle in non-interactive mode' {
77-
if ([Environment]::UserInteractive) {
77+
if ([Environment]::UserInteractive -and -not $env:GITHUB_WORKFLOW) {
7878
Write-Warning "Cannot test non-iteractivity interactively"
7979
} else {
8080
$dataBlockTurtle = data -supportedCommand turtle, Get-Random {

0 commit comments

Comments
 (0)