Repository navigation
fix: incode update points a package-managed install at its manager - #71
Merged
Merged
Conversation
…efs #56) Root cause: `incode update` replaced the running program's files wherever they were. Since #70 incode installs through winget, Scoop and Homebrew, which keep track of the files they install: replaced underneath them, the manager would still list the old version and its next upgrade would undo the update. Now `package_manager` recognises an install by where each manager puts it, as package-check.yml measured: Homebrew's Cellar/incode/<version>, Scoop's apps/incode (a `scoop` root, or the one SCOOP/SCOOP_GLOBAL names), winget's WinGet/Packages/IncordAI.Incode_*. For such an install, `incode update` changes nothing and names the manager's command (`brew upgrade incode`, `scoop update incode`, `winget upgrade IncordAI.Incode`); `--check` names it too. Installs by the scripts update themselves as before. The decision after the release lookup is now `next_step`, apart from the network and the files, so every outcome is tested: managed and refused, managed with --check, unmanaged install, up to date, untagged release. The path rules are tested on paths from every platform, with near misses. The new test fails with the manager ignored.
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.
From #56: once incode installs through winget, Scoop or Homebrew (#70),
incode updatemust not replace files those managers keep track of.Change
package_managerrecognises an install by where each manager puts it, the same layout the package check measured on every platform:Cellar/incode/<version>;apps/incode, underscoopor the rootSCOOP/SCOOP_GLOBALnames;WinGet/Packages/IncordAI.Incode_*.incode updatedoes there: changes nothing, exits non-zero, and names the manager's command:brew upgrade incode,scoop update incodeorwinget upgrade IncordAI.Incode.incode update --checknames it too.next_step, so every outcome is unit-tested without the network.Verified
-D warningsclean; 2344 lib + 59 bin tests passed.