Skip to content

Commit

Permalink
Merge pull request #63 from bpineau/fix_relpath
Browse files Browse the repository at this point in the history
Fix git local dir on relative paths
  • Loading branch information
bpineau committed May 14, 2018
2 parents 47d8d87 + ed1b3fc commit 4736972
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ ready to run on your desktop or in a cluster.

We also provide a [docker image](https://hub.docker.com/r/bpineau/katafygio/).

On MacOs, you can use the brew formula:
```bash
brew install bpineau/tap/katafygio
```

You can also deploy with the provided [helm](https://helm.sh/) chart:
```shell
helm install --name kf-backups --namespace kube-system assets/helm-chart/katafygio/
Expand Down
6 changes: 6 additions & 0 deletions pkg/store/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"os"
"os/exec"
"path/filepath"
"time"

"github.com/spf13/afero"
Expand Down Expand Up @@ -145,6 +146,11 @@ func (s *Store) Status() (changed bool, err error) {
// CloneOrInit create a new local repository, either with "git clone" (if a GitURL
// to clone from is provided), or "git init" (in the absence of GitURL).
func (s *Store) CloneOrInit() (err error) {
s.LocalDir, err = filepath.Abs(s.LocalDir)
if err != nil {
return fmt.Errorf("can't find local dir absolute path (broken cwd?): %v", err)
}

if !s.DryRun {
err = appFs.MkdirAll(s.LocalDir, 0700)
if err != nil {
Expand Down

0 comments on commit 4736972

Please sign in to comment.