Skip to content

Commit

Permalink
Build - Update WinSCP Core 5.13.9. Standardized PositionalBindings. U…
Browse files Browse the repository at this point in the history
…pdated help.
  • Loading branch information
dotps1 committed Mar 21, 2019
1 parent 885c417 commit 0c025ab
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions WinSCP/Public/Start-WinSCPConsole.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
function Start-WinSCPConsole {

[CmdletBinding(
ConfirmImpact = "None",
ConfirmImpact = "Medium",
HelpUri = "https://github.com/dotps1/WinSCP/wiki/Start-WinSCPConsole",
PositionalBinding = $false
PositionalBinding = $false,
SupportsShouldProcess = $true
)]
[OutputType(
[Void]
Expand All @@ -14,5 +15,11 @@
$process = "$PSScriptRoot\..\bin\WinSCP.exe"
$args = "/Console"

Start-Process -FilePath $process -ArgumentList $args -Wait
$shouldProcess = $PSCmdlet.ShouldProcess(
$process
)

if ($shouldProcess) {
Start-Process -FilePath $process -ArgumentList $args -Wait
}
}

0 comments on commit 0c025ab

Please sign in to comment.