Skip to content

Commit

Permalink
CR Fixes 2
Browse files Browse the repository at this point in the history
  • Loading branch information
N-o-Z committed Aug 2, 2023
1 parent 305d1ec commit bd0cd85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/lakectl/cmd/local_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var localInitCmd = &cobra.Command{
DieErr(err)
}
if IndexExists(localPath) && !force {
Die(fmt.Sprintf("directory '%s' already linked to a lakefs path, run command with --force to overwrite", localPath), 1)
DieFmt("directory '%s' already linked to a lakefs path, run command with --force to overwrite", localPath)
}

// dereference
Expand All @@ -48,10 +48,10 @@ var localInitCmd = &cobra.Command{
}

ignoreFile, err := git.Ignore(localPath, []string{localPath, IndexFileName}, []string{IndexFileName}, IgnoreMarker)
if err != nil && !errors.Is(err, git.ErrNotARepository) {
DieErr(err)
} else if err == nil {
if err == nil {
fmt.Println("location added to", ignoreFile)
} else if !errors.Is(err, git.ErrNotARepository) {
DieErr(err)
}

fmt.Printf("Successfully linked local directory '%s' with remote '%s'\n", localPath, remote)
Expand Down

0 comments on commit bd0cd85

Please sign in to comment.