Skip to content

fix(cron): pass shell scripts to bash with POSIX paths - #43076

Closed
BROCCOLO1D wants to merge 1 commit into
NousResearch:mainfrom
BROCCOLO1D:fix/43073-cron-bash-windows-path
Closed

fix(cron): pass shell scripts to bash with POSIX paths#43076
BROCCOLO1D wants to merge 1 commit into
NousResearch:mainfrom
BROCCOLO1D:fix/43073-cron-bash-windows-path

Conversation

@BROCCOLO1D

Copy link
Copy Markdown
Contributor

Summary

Why

  • str(Path(...)) produces backslash-separated Windows paths.
  • Bash treats those backslashes as escapes, so paths like C:\Users\...\cron-watchdog.sh are mangled before execution.

Changes

  • cron/scheduler.py: formats bash script argv paths via Path.as_posix() while leaving Python script execution unchanged.
  • tests/cron/test_cron_script.py: adds a regression check for Windows path conversion.

Validation

  • python -m pytest tests/cron/test_cron_script.py -o 'addopts=' -q
  • python -m py_compile cron/scheduler.py
  • python -m ruff check cron/scheduler.py tests/cron/test_cron_script.py

Scope

  • In scope: .sh/.bash cron script argv path formatting for bash.
  • Out of scope: changing cron script path validation or Python script execution.

@BROCCOLO1D

Copy link
Copy Markdown
Contributor Author

Closing this as stale: there has been no activity or maintainer follow-up for over a week, and I don't want to leave inactive work open. Happy to reopen/rework if this becomes useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: .sh cron scripts fail on Windows - bash receives mangled backslash paths

2 participants