chore: [PR-1797] re-land sf migrate command and Rust CLI migration banner#268
Conversation
Reverts the revert in #267, restoring the changes from #266. The Rust CLI install script bug (missing `sf-old` fallback) was traced to a disambiguation issue when the legacy CLI lives in the same install dir as the new one; Seb has a fix in flight on sfcompute/sfcompute, so it's safe to re-introduce the banner + `sf migrate` subcommand. Generated with [Indent](https://indent.com) Co-Authored-By: Indent <noreply@indent.com>
Changed Files
|
|
|
Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews. |
sf migrate command and Rust CLI migration bannersf migrate command and Rust CLI migration banner
| ...process.env, | ||
| ...(version ? { SF_CLI_VERSION: version } : {}), | ||
| SF_CLI_TARGET_DIR: dirname(process.execPath), | ||
| SF_CLI_BINARY_NAME: basename(process.execPath), |
There was a problem hiding this comment.
Latent UX regression for non-default install paths: when process.execPath is e.g. /usr/local/bin/sf, install.sh will now mkdir -p /usr/local/bin and mv "${TMPDIR}/dist/sf-$target" /usr/local/bin/sf (lines 50 and 129 of install.sh) without sudo. Both calls EACCES for non-root users, so the upgrade fails after fetching/extracting — a worse UX than the previous behavior of silently dropping a duplicate at ~/.local/bin/sf. The comment above explicitly chose this trade-off, so this is a callout, not necessarily a blocker — but if a user reports sf upgrade suddenly broken after this lands, this is the first place to look.
|
Confirmed via The Generated by Indent - session link |
Summary
Reverts #267 (which reverted #266). Restores the
sf migratesubcommand and the legacy-CLI migration banner pointing users at the Rust CLI installer.Motivation
#267 pulled the banner because the Rust CLI installer at
cli.sfcompute.comwasn't actually creating thesf-oldfallback the banner advertised. With the installer fix landing, the original UX from #266 is safe to ship again.No code changes vs #266 — this is a pure
git revertof the revert commit (34edddab).Testing
cli.sfcompute.com.