The script is probably launched as another user or called with options to disable interactive functions and / or startup scripts. It is as it should be; there is nothing wrong with that.
You can add . /home/you/.bashrc . /home/you/.bashrc as a quick and dirty workaround; or, more correctly, just make changes to the PATH script directly; or, more correctly, modulate dependencies, for example. by putting the code in a separate file, which you use both from your .bashrc and from this script, but for this isolated case this is definitely overkill.
The command "include" command line file is called "source" or "point"; in Bash, source is available as a synonym, but in the correct Bourne shell, this is a literal dot (aka period, full stop):
. /path/to/stuff
source share