You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've come across an issue with regards to the script resouce.
I'm targeting a windows server using WINRM, my script is written in PowerShell and I'm using inspec version 0.15.0
The error I was getting was that when using the inspec shell the stdout of my script would return nothing ""
e.g.
inspec> script(script).stdout => ""
I know my script is OK, after a bit of troubleshooting I think there is a limit of 1166 characters.
Here is a script block to demonstrate, if you run this it should work (in that it returns the numbers) but if you add 5 to the last line it should fail.
The script I'm trying to run comes in at just over 1600 chars (I'm having to use my own functions) but I'll see if I can put it on a diet to squeeze it in :)
Thanks
Gary
The text was updated successfully, but these errors were encountered:
Running into the same issue. I have a powershell script that needs to run before a test and it's outputting nothing if it's longer than a certain length although the script is only 5k. My thinking is that I create the script in a separate recipe and add it to the kitchen run list. I'd rather do it all through the inspec code but may have to resort to this. Any other ideas?
Hi there
I've come across an issue with regards to the script resouce.
I'm targeting a windows server using WINRM, my script is written in PowerShell and I'm using inspec version 0.15.0
The error I was getting was that when using the inspec shell the stdout of my script would return nothing ""
e.g.
inspec> script(script).stdout => ""
I know my script is OK, after a bit of troubleshooting I think there is a limit of 1166 characters.
Here is a script block to demonstrate, if you run this it should work (in that it returns the numbers) but if you add 5 to the last line it should fail.
The script I'm trying to run comes in at just over 1600 chars (I'm having to use my own functions) but I'll see if I can put it on a diet to squeeze it in :)
Thanks
Gary
The text was updated successfully, but these errors were encountered: