I have this post-receive
script as a git hook when exporting with the following contents
#!/usr/bin/env bash
export NODE_ENV=production
git --work-tree=/home/myusername/app --git-dir=/home/myusername/git checkout -f
cd /home/myusername/app
npm prune
npm install --production
knex migrate:latest
When ssh'd in my server I installed knex globally but it doesn't seem to exist within the bash shell's environment. I lack the knowledge of knowing how they are different. I also noticed my node versions were different. How do I import my user's normal environment?