[p4] Triggers not working for me.
steve at vance.com
Thu Oct 18 06:42:18 PDT 2001
Robert is absolutely correct. If you do a 'p4 help triggers' the second
paragraph states that output to stdout (not stderr) will only be shown for
a non-zero exit status, thus Robert's quoting of "works."
Given this, I find Robert's output a little unusual, as the echo to stdout
is not shown, but the shell generated error (to stderr) is. This strikes
me as the reverse of the documentation.
At 10:00 AM 10/18/2001 +0100, Robert Cowham wrote:
>For a trigger to "work" it needs to exit with non zero status (and
>preferably put some text to standard out). Your echo is exiting with zero
>status so the trigger doesn't "fire" or have any effect on the submit. Try
>robert:/usr/home/robert/temp$ p4 triggers -o
># See 'p4 help triggers' for more information about triggers.
> something //... "/bin/echo 'hello world'; /bin/badcommand"
>Then when I do a submit:
>sh: /bin/badcommand: No such file or directory
>Change 2 created with 2 open file(s).
>Submitting change 2.
>Locking 2 files ...
>Submit validation failed -- fix problems then use 'p4 submit -c 2'.
>Submit check 'something' failed: hello world
>/bin/badcommand is a non existent command which produces a non zero error.
>From: perforce-user-admin at perforce.com
>[mailto:perforce-user-admin at perforce.com]On Behalf Of Joseph Fota
>Sent: Thursday, October 18, 2001 01:10
>To: perforce-user at perforce.com
>Subject: [p4] Triggers not working for me.
>After trying various permutations of a script, I have whittled my trigger
>down to the following:
> whatswrong //depot/... "/bin/echo 'Hello World!'"
>But that doesn't work either after doing a "p4 submit". Am I missing
>p4d is running on a Solaris 8 box.
mailto:steve at vance.com
More information about the perforce-user