File tree Expand file tree Collapse file tree 2 files changed +19
-10
lines changed Expand file tree Collapse file tree 2 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 9
9
- Upd: Template PSFTests - Added localization string tests
10
10
- Upd: Remove-PSMDTemplate - Refactored and updated messaging / ShouldProcess implementation
11
11
- 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
12
14
- Fix: Template PSFProject - Publish Folder created during build is created using ` -Force `
13
15
- Fix: Template PSFProject - Cleaning up Azure Function conversion
14
16
- Fix: Template PSFTests - Encoding test no longer fails on core (#104 )
Original file line number Diff line number Diff line change 51
51
$NoProfile
52
52
)
53
53
54
- if ( $PSCmdlet .ShouldProcess ( " Current shell " , " Restart " ))
54
+ begin
55
55
{
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" ))
62
61
{
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 }
65
73
}
66
- if (-not $NoExit ) { exit }
67
74
}
68
75
}
69
76
New-Alias - Name Restart-Shell - Value Restart-PSMDShell - Option AllScope - Scope Global
You can’t perform that action at this time.
0 commit comments