Powershell script hangs

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Powershell scripts doesn't return control to Bamboo, build hangs forever.

原因

Bamboo expect child process to close its output stream (stdout and stderr) when exiting. Powershell doesn't do it.

ソリューション

  1. If you're creating an executable for Powershell and running it via a Command task, add a '-inputformat none' to the command argument. The command argument field should look like this:

    -inputformat none -command
  2. If directly calling Powershell script from Bamboo, use Script task with 'Run as Powersell script option on'. Bamboo script task can handle this situation.
  3. If Powershell is called indirectly (e.g. from ant, nant, maven, other script), make sure that the streams are closed on exit:

    powershell .\test.ps1 < NUL
最終更新日: 2015 年 12 月 18 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.