File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 - Upd: Template PSFTests - Added localization string tests
1010 - Upd: Remove-PSMDTemplate - Refactored and updated messaging / ShouldProcess implementation
1111 - Upd: Find-PSMDFileContent - Updated extension filtering to be configurable and include .cs files by default.
12+ - Upd: Get-PSMDArgumentCompleter - Refactoring and minor performance improvement
13+ - Upd: Restart-PSMDShell - Will restart same application as current process, enabling it to restart on core versions
1214 - Fix: Template PSFProject - Publish Folder created during build is created using ` -Force `
1315 - Fix: Template PSFProject - Cleaning up Azure Function conversion
1416 - Fix: Template PSFTests - Encoding test no longer fails on core (#104 )
Original file line number Diff line number Diff line change 5151 $NoProfile
5252 )
5353
54- if ( $PSCmdlet .ShouldProcess ( " Current shell " , " Restart " ))
54+ begin
5555 {
56- if ($NoProfile )
57- {
58- if ($Admin ) { Start-Process powershell.exe - Verb RunAs - ArgumentList ' -NoProfile' }
59- else { Start-Process powershell.exe - ArgumentList ' -NoProfile' }
60- }
61- else
56+ $powershellPath = (Get-Process - id $pid ).Path
57+ }
58+ process
59+ {
60+ if ($PSCmdlet.ShouldProcess (" Current shell" , " Restart" ))
6261 {
63- if ($Admin ) { Start-Process powershell.exe - Verb RunAs }
64- else { Start-Process powershell.exe }
62+ if ($NoProfile )
63+ {
64+ if ($Admin ) { Start-Process $powershellPath - Verb RunAs - ArgumentList ' -NoProfile' }
65+ else { Start-Process $powershellPath - ArgumentList ' -NoProfile' }
66+ }
67+ else
68+ {
69+ if ($Admin ) { Start-Process $powershellPath - Verb RunAs }
70+ else { Start-Process $powershellPath }
71+ }
72+ if (-not $NoExit ) { exit }
6573 }
66- if (-not $NoExit ) { exit }
6774 }
6875}
6976New-Alias - Name Restart-Shell - Value Restart-PSMDShell - Option AllScope - Scope Global
You can’t perform that action at this time.
0 commit comments