Skip to content

Commit

Permalink
Fixes Support Passing Parameters #2
Browse files Browse the repository at this point in the history
  • Loading branch information
guneysus committed Jun 14, 2021
1 parent 34c62e9 commit 86f91f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Binary file modified pake/pake.psd1
Binary file not shown.
21 changes: 12 additions & 9 deletions pake/pake.psm1
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
function Invoke-Pake () {
[CmdletBinding()]
param(
[Parameter()]
$Target
[string] $Target
)

. ".\pakefile.ps1"
Write-Output "Executing $($Target)"
switch -CaseSensitive ($Target) {
"" {
& $default
$Target=$default
break
}
"default" {
Write-Output "DEFAULT!"
$Target=$default
break
}
Default {
& $Target
break
break
}
}

Write-Output "Executed $($Target)"
write-debug "Args: $($Args)"
write-debug "Unbound Arguments: $($MyInvocation.UnboundArguments)"
write-debug "Input: $($input)"
write-debug "Bound Parameters: $($MyInvocation.BoundParameters)"

write-debug "Executing $($Target)"
invoke-expression "$Target $($MyInvocation.UnboundArguments)"
write-debug "Executed $($Target)"
}

set-alias pake Invoke-Pake
Expand Down

0 comments on commit 86f91f5

Please sign in to comment.