Disable CLI auto-upgrade, retain version warning#256
Closed
sigmachirality wants to merge 1 commit intomainfrom
Closed
Disable CLI auto-upgrade, retain version warning#256sigmachirality wants to merge 1 commit intomainfrom
sigmachirality wants to merge 1 commit intomainfrom
Conversation
Remove the automatic upgrade logic that ran 'sf upgrade' for patch updates, which could fail with MODULE_NOT_FOUND errors in certain environments. The CLI now only shows a warning box prompting users to run 'sf upgrade' manually when a newer version is available. Also removes the SF_CLI_DISABLE_AUTO_UPGRADE env var check since auto-upgrade no longer exists. Co-authored-by: Daniel Tao <danieltaox@gmail.com>
Member
Author
|
Closing in favor of #246 |
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.
Summary
Removes the automatic upgrade logic from the CLI that would silently run
sf upgradeon patch version changes. This addresses theMODULE_NOT_FOUNDcrash reported in the Brev CLI context, where the auto-upgrade path could fail depending on the user's environment.Changes
checkVersion()that ranexecSync("sf upgrade")for patch updates and re-executed the user's original commandexecSyncimport (no longer needed)SF_CLI_DISABLE_AUTO_UPGRADEenv var check (no longer relevant since auto-upgrade no longer exists)sf upgrademanually — now shown for all outdated versions (patch, minor, major), not just non-patch updatesBehavior
Before: Patch updates triggered an automatic
sf upgrade+ command re-run. Non-patch updates showed a warning box.After: All outdated versions show a warning box prompting the user to manually run
sf upgrade. No automatic upgrades occur.Slack Thread