Skip to content

Commit

Permalink
fix: ignore .git directories when looking for session files (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller authored Mar 20, 2023
1 parent 5509776 commit b5c2afd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/cmd/sessions/selectsession/selectsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ func SelectSession(io *iostreams.IOStreams, cfg *config.Config, log *logger.Logg
log.Printf("Ignoring dir: %+v", info.Name())
return filepath.SkipDir
}

if info.IsDir() && info.Name() == ".git" {
log.Printf("Ignoring dir: %+v", info.Name())
return filepath.SkipDir
}
if info.IsDir() {
return nil
}
Expand Down

0 comments on commit b5c2afd

Please sign in to comment.