I am building a program that relies on a series of external programs (pandoc, samtools, vcflib, etc..). To ensure that the correct versions are being used, I have downloaded the binaries for all of them and placed them in a bin directory, included with the program. When the program runs, I want to make sure that these are the versions used, regardless of other system installed versions.
Is it generally considered safe for the program to run a command like PATH=~/my_program/bin:$PATH to add its own binaries to the beginning of the $PATH?
I saw related questions here and here but was not clear if implementing this was actually advisable or not, or if there might be unintended consequences under these circumstances.