We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b85185 commit 5cb2379Copy full SHA for 5cb2379
_InitializeRepository.ps1
@@ -76,8 +76,9 @@ Begin
76
77
function DeleteThisScript
78
{
79
- [string] $scriptPath = $MyInvocation.MyCommand.Path
80
- [string] $deleteCommand = "-ExecutionPolicy Bypass -NoProfile -Command `"Start-Sleep -Seconds 1; Remove-Item -Path $scriptPath -Force`""
+ [string] $scriptPath = Join-Path -Path $PSScriptRoot -ChildPath '_InitializeRepository.ps1'
+ Write-Output "Script path to delete is: $scriptPath"
81
+ [string] $deleteCommand = "-ExecutionPolicy Bypass -NoProfile -Command `"Start-Sleep -Seconds 1; Remove-Item -Path '$scriptPath' -Force`""
82
83
$powerShellVersion = $PSVersionTable.PSVersion.Major
84
if ($powerShellVersion -le 5)
0 commit comments