$PATH environment is not correct

in localhost

[root@drone ~]# echo $PATH
[root@drone ~]#
[root@drone ~]# which gradle

but in pipeline

+ echo $PATH
+ which gradle
which: no gradle in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)

i have restarted the drone server and drone exec runner service and also reinstalled.

the exec runner reads the PATH from the environment. If the PATH is incorrect it is because it is not being passed the correct PATH at runtime.