fix(watch): pin scheduled entry to an absolute, stable devflow launcher - #88
Merged
Merged
Conversation
command -v devflow can return a RELATIVE path (./bin/devflow) when PATH has a relative entry, so devflow watch setup wrote a launchd plist / cron entry whose target resolved against the working directory (the source checkout) instead of the stable installed launcher - defeating the survives-auto-reinstall property. New _devflow_launcher resolves an absolute, stable target: the copy-install BINDIR launcher derived from DEVFLOW_ROOT, else an absolutized command -v result. _watch_setup uses it for the launchd ProgramArguments/PATH and the cron entry. watch.bats 34/34. Follow-up to #84/#87.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Follow-up to #84/#87.
command -v devflowcan return a relative path (./bin/devflow) when PATH has a relative entry, sodevflow watch setupwrote a launchd plist / cron entry whose target resolved against the working directory (the source checkout) instead of the stable installed launcher — defeating the survives-auto-reinstall property (and pinning to possibly-dirty source).Fix
New
_devflow_launcherreturns an absolute, stable target: the copy-install BINDIR launcher derived fromDEVFLOW_ROOT(<prefix>/share/devflow-><prefix>/bin/devflow), else an absolutizedcommand -vresult._watch_setupuses it for the launchdProgramArguments/PATHand the cron entry.Verification
_devflow_launcherderives the BINDIR launcher from DEVFLOW_ROOT and always returns absolute. watch.bats 34/34.~/.local/bin/devflow(ProgramArguments + PATH), and_detect_install_modereturnsinstallunder launchd's minimal PATH.Builds on v0.27.1.
🤖 Generated with Claude Code