Skip to content

Commit

Permalink
fix wowking diwectowy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ShindouMihou committed Feb 2, 2023
1 parent 9c3675e commit 1d6b642
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
app
git-uwu
git-uwu
5 changes: 2 additions & 3 deletions utils/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ package utils
import (
"log"
"os"
"path/filepath"
)

var CurrentDirectory string

func GetCurrentDirectory() string {
if CurrentDirectory == "" {
executable, err := os.Executable()
executable, err := os.Getwd()
if err != nil {
log.Fatal("failed to get current directory : ", err)
}
CurrentDirectory = filepath.Dir(executable)
CurrentDirectory = executable
}
return CurrentDirectory
}

0 comments on commit 1d6b642

Please sign in to comment.