3.14ki
Executing "git rev-parse --short HEAD" crashes deployment
Hey there,
I'm creating another instance of my project, currently it's running on AWS and I intend to create the Railway one too.
In my NestJS project I have a line that "Health Check" status route that returns some data and alongside it a git hash.
revision: child_process.execSync('git rev-parse --short HEAD').toString().trim()
I'm using Docker as my builder, and in it I have a RUN apk add --no-cache git
Deploy Logs are saying next:
I saw that Railway provides the env RAILWAY_GIT_COMMIT_SHA
but , I'm not sure if I can refactor it and make it work on AWS too. I fetch the shortened SHA inside a config object of an imported module.19 replies