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:
@@ -12,7 +12,10 @@ function Get-SublimeSettingsPath
|
|||||||
function Get-SublimePackagesPath
|
function Get-SublimePackagesPath
|
||||||
{
|
{
|
||||||
$packagesPath = Join-Path (Get-SublimeSettingsPath) 'Packages'
|
$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
|
return $packagesPath
|
||||||
}
|
}
|
||||||
@@ -20,7 +23,10 @@ function Get-SublimePackagesPath
|
|||||||
function Get-SublimeUserPath
|
function Get-SublimeUserPath
|
||||||
{
|
{
|
||||||
$path = Join-Path (Get-SublimePackagesPath) 'User'
|
$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
|
return $path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user