I have a python script trigger.py
stored in a depot at //MyDepot/TriggerTest-main/trigger.py. I want this to trigger whenever a user attempts to submit a changelist in //MyOtherDepot.
My trigger spec is as follows:
Triggers:
block-all-changes change-submit //MyOtherDepot/... "py %//MyDepot/TriggerTest-main/trigger.py%"
I get the following error when I make a submit request from //MyDepot:
Submit validation failed -- fix problems then use 'p4 submit -c 104762'.
'block-all-changes' validation failed:
Execution Failed: py /tmp/tmp.8904.140611025375744.260.py: No such file or directory
Submit aborted -- fix problems then use 'p4 submit -c 104762'.
Why is the script not being located?
I'm thinking py isn't in the PATH.
Hard code your path to rule that out:
block-all-changes change-submit //MyOtherDepot/... "/usr/bin/py %//MyDepot/TriggerTest-main/trigger.py%"