@misterhuydo/sentinel 1.4.73 → 1.4.74

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": "@misterhuydo/sentinel",
3
- "version": "1.4.73",
3
+ "version": "1.4.74",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -632,13 +632,14 @@ async def _send_startup_email_delayed(cfg, results: dict, delay: int = 300):
632
632
 
633
633
  # ── Config repo polling ──────────────────────────────────────────────────────────────────────────
634
634
 
635
- def _config_repo_git_env() -> dict:
635
+ def _config_repo_git_env(project_dir: Path | None = None) -> dict:
636
636
  """Return env with GIT_SSH_COMMAND pointing to ~/.ssh/<slug>.key if it exists."""
637
637
  env = os.environ.copy()
638
638
  try:
639
+ cwd = str((project_dir or Path(".")).resolve())
639
640
  r = subprocess.run(
640
641
  ["git", "remote", "get-url", "origin"],
641
- capture_output=True, text=True, timeout=5,
642
+ cwd=cwd, capture_output=True, text=True, timeout=5,
642
643
  )
643
644
  remote = r.stdout.strip()
644
645
  # Extract slug: git@github.com:org/repo.git or https://github.com/org/repo.git
@@ -662,7 +663,7 @@ def _poll_config_repo(cfg_loader: ConfigLoader) -> bool:
662
663
  ["git", "pull", "--rebase", "--autostash"],
663
664
  cwd=str(project_dir),
664
665
  capture_output=True, text=True, timeout=30,
665
- env=_config_repo_git_env(),
666
+ env=_config_repo_git_env(project_dir),
666
667
  )
667
668
  if result.returncode != 0:
668
669
  logger.warning("Config repo git pull failed: %s", result.stderr.strip())