diff options
author | xengineering <me@xengineering.eu> | 2024-07-05 21:21:37 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-07-05 21:21:37 +0200 |
commit | 8af796c9379c697bf56feb9ec4d33b43cdccd472 (patch) | |
tree | f730be9d8b996f7d6efe836eb6d67c3df072d790 | |
parent | e182282eb387d8c73d82e81d2e1fc1aaf5734810 (diff) | |
download | craft-8af796c9379c697bf56feb9ec4d33b43cdccd472.tar craft-8af796c9379c697bf56feb9ec4d33b43cdccd472.tar.zst craft-8af796c9379c697bf56feb9ec4d33b43cdccd472.zip |
Print current working directory
When craft is used - as intended - as Git post-receive hook the current
working directory should always be the .git folder. In case of bare
repositories this should point to the bare repository.
-rw-r--r-- | main.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -11,6 +11,12 @@ import ( ) func main() { + cwd, err := os.Getwd() + if err != nil { + log.Fatal(err) + } + fmt.Printf("Current working directory: %s\n", cwd) + for { fmt.Println(getUpdate()) } |