Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Returning a list from a PSEval execution
-
So does it work with PSCall or is that the patch you've submitted? Sorry wasn't clear to me.
If PSCall works now that would be fine for me. I just didn't realize you could get values back from PSCall.
-
The patch I submitted makes PSCall able to use output variables that are
%and@in addition to the$variables it already supports. -
Great. Thanks for clarifying.
-
Thanks Ben! I've merged the pull request and we'll be deploying the updated extension shortly.
-
When will this fix be pushed out? I've upgraded to 5.6.9 and all the extensions are showing they are up-to-date. I'm following the example given above but I still get the cannot assign a Scalar value to a Map Variable.
-
The latest version of Windows.bmx is 5.6.3, which doesn't include the fix:
https://github.com/Inedo/inedox-windows/compare/BuildMaster-5.6.3.1...master
I'll see if I can get someone to publish it.
-
The new version of the windows extension was pushed earlier!
-
Still not working for me. Still getting the Cannot assign a scalar value to a map variable.
This is on 5.6.9 and with the latest update to the Windows extension.Here is what I have done.
I have a test Powershell script saved into Script Assests:
$var1 = 'serviceName' $var2 = 'type' $hashlist = @{} for ($i=1;$i -le 5; $i++) { $hashlist.Add($var1+$i,$var2+$i) }and then in the Plan I'm calling it like this:
PSCall TestApp::TestToWriteOutMappedValues
(
items => %hashlist
);# Loop foreach $key in @MapKeys(%items) { set $value = $MapItem(%items,$key); Log-Information Begin $key ---- $value; } -
You have the order of the output parameter reversed. It goes
PowerShellVariableName => OtterScriptVariableName, so it should behashlist => %items. -
Thanks. That of course fixed it.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login