Skip to content

Commit

Permalink
Rename Trim function in Common
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkone committed Apr 22, 2016
1 parent ce571ba commit 8196e19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions VSTS.DNX.Tasks.BuildNugetPackage/BuildNugetPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ param (
[String] [Parameter(Mandatory = $false)]
$WorkingFolder = "",
[String] [Parameter(Mandatory = $false)]
$SourceFolder = ""
$SourceFolder = "",
[String] [Parameter(Mandatory = $true)]
$SpecificRuntime,
[String] [Parameter(Mandatory = $true)]
Expand All @@ -35,7 +35,7 @@ Function Main
$BuildConfiguration = "Release"
}

$SourceFolder = Trim-Path $SourceFolder
$SourceFolder = Get-TrimedPath $SourceFolder

$isPreRelease = [System.Convert]::ToBoolean($PreRelease)

Expand Down
2 changes: 1 addition & 1 deletion VSTS.DNX.Tasks.BuildWebPackage/BuildWebPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Function Main
$BuildConfiguration = "Release"
}

$SourceFolder = Trim-Path $SourceFolder
$SourceFolder = Get-TrimedPath $SourceFolder

$isPublishSource = [System.Convert]::ToBoolean($PublishSource)

Expand Down
6 changes: 3 additions & 3 deletions VSTS.DNX.Tasks.Shared/Common.psm1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
function Trim-Path
function Get-TrimedPath
{
param (
[String] [Parameter(Mandatory = $true)]
$Path = ""
)

Write-Verbose "Entering Method Trim-Path"
Write-Verbose "Entering Method Get-TrimedPath"

$Path = $Path.Trim().Trim("""").Trim().Replace("/","\\").Trim("\")
if($Path -ne "")
Expand All @@ -17,7 +17,7 @@
$Path = ".\"
}

Write-Verbose "Leaving script Trim-Path"
Write-Verbose "Leaving script Get-TrimedPath"

return $Path
}

0 comments on commit 8196e19

Please sign in to comment.