mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-22 00:06:02 +01:00
feature (nixos): working directory override - #403
This commit is contained in:
parent
49b652dd9c
commit
09a6b8f6c0
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue