Skip to content

Commit

Permalink
(GH-1039) Remove quotes before testing path
Browse files Browse the repository at this point in the history
This will remove unnecessary warnings when checking for the existence
of an executable that will be run.
  • Loading branch information
ferventcoder committed Mar 19, 2017
1 parent 25ab95f commit 8d810b1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ param(
Write-Debug "Removing null characters resulted in an error - $($_.Exception.Message)"
}

if ($exeToRun -ne $null) {
$exeToRun = $exeToRun.Trim().Trim("'").Trim('"')
}

$wrappedStatements = $statements
if ($wrappedStatements -eq $null) { $wrappedStatements = ''}

Expand Down Expand Up @@ -236,10 +240,6 @@ $dbMessagePrepend [`"$exeToRun`" $wrappedStatements]. This may take a while, dep
# in case empty args makes a difference, try to be compatible with the older
# version
$psi = New-Object System.Diagnostics.ProcessStartInfo

if ($exeToRun -ne $null) {
$exeToRun = $exeToRun.Trim().Trim("'").Trim('"')
}

$psi.FileName = $exeToRun
if ($wrappedStatements -ne '') {
Expand Down

0 comments on commit 8d810b1

Please sign in to comment.