The $(shell) function calls the shell to execute the command. The command is executed in this case pwd , as if you were running pwd at the bash command line.
So $(shell pwd) will return the current working directory. You cannot guarantee that the $PWD variable exists in your production environment.
source share