I see [system.collections.stack]$script:context defined at the
beginning of psake.psm1.
The only reason why one would need stack is because of nested callings
of invoke-psake, right? Or am I missing something?
If so, it could be probably possible to let just call stack work for
us. Variables are retrieved in a dynamic way, so if each Invoke-Psake
would define its context, it should work.
Example:
function wrapper1 {
$Test = 'wrapper1'
wrapper2
}
function wrapper2 {
wrapper3
}
function wrapper3 {
$Test = 'wrapper3'
variablegetter
}
function variablegetter {
write-host Retrieving all variables names Test
0..4 | % { Get-Variable Test -scope $_ -ea 0 } | ft -auto *
}
wrapper1
-----returns-------
Name Description Value Visibility Module ModuleName Options
Attributes
---- ----------- ----- ---------- ------ ---------- -------
----------
Test wrapper3 Public None
{}
Test wrapper1 Public None {}
--
You received this message because you are subscribed to the Google Groups "psake-dev" group.
To post to this group, send email to
psak...@googlegroups.com.
To unsubscribe from this group, send email to
psake-dev+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/psake-dev?hl=en.