feature (nixos): working directory override - #403

This commit is contained in:
Pablo Ovelleiro Corral
2021-08-30 15:35:08 +02:00
committed by GitHub
parent 49b652dd9c
commit 09a6b8f6c0

View File

@ -12,6 +12,9 @@ func GetCurrentDir() string {
if MOCK_CURRENT_DIR != "" {
return MOCK_CURRENT_DIR
}
if os.Getenv("WORK_DIR") != "" {
return os.Getenv("WORK_DIR")
}
ex, _ := os.Executable()
return filepath.Dir(ex)
}