-
-
Save bielawb/d0ba5dae7908c805c5fdf5c313581e63 to your computer and use it in GitHub Desktop.
Pobieranie informacji o otwartym pliku z $psISE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( | |
($file = $psISE.CurrentFile) -and | |
(Test-Path -LiteralPath $file.FullPath) -and | |
($line = $file.Editor.CaretLineText) -and | |
($lineNumber = $file.Editor.CaretLine) | |
) { | |
if (-not $file.IsSaved) { | |
Write-Warning -Message "File $($file.FullPath) is not saved - working on current copy on disk!" | |
} | |
$config = [PesterConfiguration]@{ | |
Run = @{ | |
Path = $file.FullPath | |
} | |
} | |
# ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment