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:
1 parent
85955af86c
commit
e445d73473
1 file changed
+8
-2
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user