The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling PowerShell from SourceTree custom action

Nils Winkler
May 11, 2014

Is it possible to call a PowerShell script from a custom action in SourceTree?

I've tried adding it directly as the "Script to run", as well as using "powershell" as the script to run and then adding the actual script as one of the parameters.

Same result in both cases - the script is not called, and the SourceTree progress dialog when running the custom action never finishes. I have to press the Cancel button to stop the execution.

I've also tried wrapping the PowerShell script inside of a Batch file, but the same happens again - it never finishes. Running the batch file from command line works perfectly fine.

Is there a working example for running a PowerShell script from a SourceTree custom action?

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
May 11, 2014

Can you view details when running the custom action? If so, is there anything there?

You might try experimenting with running a random powershell script that requires no parameters. It may be that the parameters you're using need escaped or quoted differently.

TAGS
AUG Leaders

Atlassian Community Events