powershell - Psake Include method not working -
i writing simple ps script psake , have problem when try include ps1 file.
ps c:\ci> include .\envsettings.ps1 i have exception
exception calling "peek" "0" argument(s): "stack empty." @ c:\users\julien\documents\windowspowershell\modules\psake\psake.psm1:227 char:2 + $psake.context.peek().includes.enqueue(($pa)); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + categoryinfo : notspecified: (:) [], methodinvocationexception + fullyqualifiederrorid : invalidoperationexception i had @ psake.psm1 line 227 see what's going on around
# .externalhelp psake.psm1-help.xml function include { [cmdletbinding()] param( [parameter(position=0,mandatory=1)][string]$filenamepathtoinclude ) assert (test-path $filenamepathtoinclude -pathtype leaf) ($msgs.error_invalid_include_path -f $filenamepathtoinclude) $psake.context.peek().includes.enqueue((resolve-path $filenamepathtoinclude)); } the code succesfully pass assert line.
the problem comes resolve-path $filenamepathtoinclude, returns nothing... if try command line works fine.
anyone experienced problem before?
the way include file not include .\envsettings.ps1 , "dot source" file :
. .\envsettings.ps1
Comments
Post a Comment