resolveWorkingDirForSession accepts an explicit --repo flag value and falls back to the current working directory. Unlike resolveRepoDir it does not require the target to be a git repository, so users can inspect sessions even after archiving a checkout.
(input string)
| 243 | // require the target to be a git repository, so users can inspect sessions |
| 244 | // even after archiving a checkout. |
| 245 | func resolveWorkingDirForSession(input string) (string, error) { |
| 246 | dir, _, err := resolveWorkingDir(input, false) |
| 247 | if err != nil { |
| 248 | return "", err |
| 249 | } |
| 250 | return dir, nil |
| 251 | } |
| 252 | |
| 253 | func printSessionTable(w io.Writer, summaries []session.Summary) { |
| 254 | tw := tabwriter.NewWriter(w, 0, 0, 2, ' ', 0) |
no test coverage detected