Scripting in Go requiring Git
benisenstein
PROOP

a year ago

My pet project is a single Go function, in which I call
cmd := exec.Command("git", "clone", "MY_REPO")
and do some work in the file system.

Current railway.json file has included git:

{ "$schema": "https://railway.app/railway.schema.json", "build": { "nixpacksPlan": { "phases": { "setup": { "nixPkgs": ["...","git"] } } } }, "deploy": { "cronSchedule": "*/5 * * * *" } }

However the logs in the service show the following:

"exec: "git": executable file not found in $PATH"

Would appreciate some insight, thank you!

Ben

Solved

9 Replies

benisenstein
PROOP

a year ago

e4cb84e5-e36b-4a89-acd6-9692be111e67


brody
EMPLOYEE

a year ago

set CGO_ENABLED=1


benisenstein
PROOP

a year ago

In the environment service-level?


brody
EMPLOYEE

a year ago

yep, service variable


benisenstein
PROOP

a year ago

Hey Brody, I solved this by just writing a Dockerfile in the end.


brody
EMPLOYEE

a year ago

did you try this suggestion first?


benisenstein
PROOP

a year ago

Yes and it didn't work


benisenstein
PROOP

a year ago

Sorry, don't remember what the issue was at this point


brody
EMPLOYEE

a year ago

!s


Status changed to Solved brody 12 months ago


Loading...