简体   繁体   中英

TeamCity PowerShell script runner build step runs differently in two projects

I have a PowerShell script that orchestrates a deployment to servers all over the place, but don't fear, it never gets past line 2.

Its the same setup on two project build configurations. However, while it works on one, it fails immediately on another when performing a very early check for a required component.

The script runs a Get-Command New-SshSession and checks the output to see if that cmdlet is available, whether the SSH module is setup.

Considering that the same script runs under the same .. I've just worked it out. I'm going to continue on a post an answer!

Anyway, considering the script path is the same, the params are almost the same, how can it fail on one and not on another?

Luke

Have you checked the x86|x64 combobox for the build step is the same for both? Otherwise PowerShell will run from SysWow64 which has a different modules folder than the 'normal' 64-bit version under System32 .

Good luck,

Luke

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM