Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable:
  (GH-1687) Allow env var in shortcut working dir
  • Loading branch information
ferventcoder committed Mar 13, 2019
2 parents 23a28b7 + 6ab765e commit 4db2e04
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ The full absolute path to the target for new shortcut.
OPTIONAL - The full absolute path of the Working Directory that will be
used by the new shortcut.
As of v0.10.12, the directory will be created unless it contains environment
variable expansion like `%AppData%\FooBar`.
.PARAMETER Arguments
OPTIONAL - Additonal arguments that should be passed along to the new
shortcut.
Expand Down Expand Up @@ -164,7 +167,7 @@ Install-ChocolateyPinnedTaskBarItem
}

if ($workingDirectory) {
if (!(Test-Path($workingDirectory))) {
if ($workingDirectory -notmatch '%\w+%' -and !(Test-Path($workingDirectory))) {
[System.IO.Directory]::CreateDirectory($workingDirectory) | Out-Null
}
}
Expand Down

0 comments on commit 4db2e04

Please sign in to comment.