Gravity update path problems

:::
::: Neutrino emissions detected...
:::
::: No custom adlist file detected, reading from default file... done!
:::
::: Getting raw.githubusercontent.com list... List updated, transport successful!
::: Getting mirror1.malwaredomains.com list... List updated, transport successful!
::: Getting sysctl.org list... No changes detected, transport skipped!
::: Getting zeustracker.abuse.ch list... List updated, transport successful!
::: Getting s3.amazonaws.com list... No changes detected, transport skipped!
::: Getting s3.amazonaws.com list... No changes detected, transport skipped!
::: Getting hosts-file.net list... List updated, transport successful!
::: Getting raw.githubusercontent.com list... List updated, transport successful!
:::
::: Aggregating list of domains... done!
::: Formatting list of domains to remove comments.... done!
::: 129108 domains being pulled in by gravity...
::: Removing duplicate domains.... done!
::: 104980 unique domains trapped in the event horizon.
:::
::: Adding adlist sources to the whitelist... done!
/opt/pihole/gravity.sh: line 216: pihole: command not found
::: Whitelisting 6 domains... done!
::: Nothing to blacklist!
::: Formatting domains into a HOSTS file...
:::
::: Cleaning up un-needed files... done!
:::
::: Refresh lists in dnsmasq...
/opt/pihole/gravity.sh: line 317: pihole: command not found
/opt/pihole/gravity.sh: line 353: pihole: command not found


changed /opt/pihole/gravity.sh

diff /opt/pihole/gravity.sh /opt/pihole/gravity.sh.orig 
32c32
< whitelistScript="/usr/local/bin/pihole -w"
---
> whitelistScript="pihole -w"
317c317
<         /usr/local/bin/pihole restartdns
---
>         pihole restartdns
353c353
< /usr/local/bin/pihole status
---
> pihole status

Check your environment variables. Chances are $PATH isn't being set/exported properly. Simply replacing one 'pihole' reference with a full path, won't fix the underlying/rest of your issues.

Mathces the output of the weekly cron mail, check this topic for a temporary solution (Errors during weekly gravity.sh update (cron)). The cron job, performing a scheduled pi-hole update has the same problem, read the solution here. Mcat12 says It is because root while running the cronjob doesn't have pihole on its path, so it can't execute it.