claude-code-tracker 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-tracker",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Automatic token, cost, and prompt tracking for Claude Code sessions",
5
5
  "keywords": [
6
6
  "claude",
@@ -15,7 +15,7 @@ from datetime import date
15
15
  def find_git_root():
16
16
  root = os.getcwd()
17
17
  while root != "/":
18
- if os.path.isdir(os.path.join(root, ".git")):
18
+ if os.path.exists(os.path.join(root, ".git")):
19
19
  return root
20
20
  root = os.path.dirname(root)
21
21
  return root
package/src/stop-hook.sh CHANGED
@@ -10,7 +10,7 @@ if [[ "${1:-}" == "--backfill-only" ]]; then
10
10
  if [[ -z "$CWD" ]]; then exit 0; fi
11
11
  PROJECT_ROOT="$CWD"
12
12
  while [[ "$PROJECT_ROOT" != "/" ]]; do
13
- [[ -d "$PROJECT_ROOT/.git" ]] && break
13
+ [[ -e "$PROJECT_ROOT/.git" ]] && break
14
14
  PROJECT_ROOT="$(dirname "$PROJECT_ROOT")"
15
15
  done
16
16
  if [[ "$PROJECT_ROOT" == "/" ]]; then exit 0; fi
@@ -37,7 +37,7 @@ if [[ -z "$CWD" || -z "$TRANSCRIPT" || ! -f "$TRANSCRIPT" ]]; then exit 0; fi
37
37
  # Find project root (walk up to .git)
38
38
  PROJECT_ROOT="$CWD"
39
39
  while [[ "$PROJECT_ROOT" != "/" ]]; do
40
- [[ -d "$PROJECT_ROOT/.git" ]] && break
40
+ [[ -e "$PROJECT_ROOT/.git" ]] && break
41
41
  PROJECT_ROOT="$(dirname "$PROJECT_ROOT")"
42
42
  done
43
43
  if [[ "$PROJECT_ROOT" == "/" ]]; then exit 0; fi