Windows: Git delivery watcher spawns visible git console windows

Open Beginner friendly
#32 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start in token_meter/services/git_delivery.py at GitDeliveryService._subprocess_runner(), then compare its subprocess call with _run_update_git() and _platform_subprocess_kwargs() in token_meter/app.py. Check WindowsPlatformServices.process_options() for the expected process options. Done means the Git delivery watcher no longer opens visible console windows on Windows while preserving the existing Git scan behavior.

Written by the indexing model from the issue text.

Description

On Windows, Token Meter flashes git console windows while running.
Similar to #19, but different call site.

The Git delivery watcher calls subprocess.run(["git", ...]) in GitDeliveryService._subprocess_runner() (token_meter/services/git_delivery.py) with no CREATE_NO_WINDOW.
Every 5 minutes, each scan opens and closes many console windows.

Suggested fix

Change GitDeliveryService._subprocess_runner() so subprocess.run gets the same kwargs _run_update_git() already passes via _platform_subprocess_kwargs() (token_meter/app.py).
On Windows those kwargs are creationflags=CREATE_NO_WINDOW (0x08000000) and close_fds=True, from WindowsPlatformServices.process_options().

Environment

  • Windows 11 Pro, 10.0.26200
  • Token Meter aa309c0 (main)
Dominant language
Python
Stars
94
Forks
16
Avg merge
1d 12h
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from splunk/token-meter

All issues in splunk/token-meter

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.