I am using SourceTree 1.6. We are using precommit shell script GIT hook. In the hook we are asking the developer to input a value from keyboard and then that value is captured in a variable and used further. When I do a commit using 'git commit' command from GIT Bash Tool it stops for the user input , after the user enters the value the script is completed successfully. But when we do a commit from SourceTree, it seems the script waits for the input but I don't see the place where to provide the input. Can you please help ?
My script is something like this:
#!/bin/sh
exec < /dev/tty
read -p 'path : ' user_entry
echo $user_entry
exit 0
Hi Amit,
SourceTree 1.6 is no longer a supported version; it's available for download only for those that need it as a fallback for a specific reason. That said, interactive scripting triggered by commits isn't supported within the Sourcetree UI.
Brian Ganninger
Senior Mac Developer, Sourcetree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.