fix: SublimeHelpers Get-* returns too much data

- on first directory create, function outputs would include two values
  instead of just the path string, which confused callers and generated
  errors during first time package installs
This commit is contained in:
Iristyle
2013-05-15 07:38:25 -04:00
parent 85955af86c
commit e445d73473

View File

@@ -12,7 +12,10 @@ function Get-SublimeSettingsPath
function Get-SublimePackagesPath
{
$packagesPath = Join-Path (Get-SublimeSettingsPath) 'Packages'
if (!(Test-Path $packagesPath)) { New-Item $packagesPath -Type Directory }
if (!(Test-Path $packagesPath))
{
New-Item $packagesPath -Type Directory | Out-Null
}
return $packagesPath
}
@@ -20,7 +23,10 @@ function Get-SublimePackagesPath
function Get-SublimeUserPath
{
$path = Join-Path (Get-SublimePackagesPath) 'User'
if (!(Test-Path $path)) { New-Item $path -Type Directory }
if (!(Test-Path $path))
{
New-Item $path -Type Directory | Out-Null
}
return $path
}