Skip to content

Instantly share code, notes, and snippets.

@pjmagee
Created April 14, 2024 20:36
Show Gist options
  • Select an option

  • Save pjmagee/16aa3af4056e30d95f353bcc500848d8 to your computer and use it in GitHub Desktop.

Select an option

Save pjmagee/16aa3af4056e30d95f353bcc500848d8 to your computer and use it in GitHub Desktop.
function Open-Exercise {
param(
[Parameter(ValueFromPipeline = $true, Mandatory = $false)]
[string]$outputFromCommand
)
Process {
$goLandPath = "goland"
Write-Host $outputFromCommand
$path = $outputFromCommand -split "`n" | Select-Object -Last 1
$path = $path.Replace("Downloaded to", "").Trim()
& $goLandPath "$path"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment