Skip to content

Commit 1dcca31

Browse files
committed
feat: disable auto-upgrade based on environment variable
Added a check to skip the auto-upgrade process if the environment variable SF_CLI_DISABLE_AUTO_UPGRADE is set. This allows users to control the upgrade behavior of the CLI more effectively.
1 parent fce12cb commit 1dcca31

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/checkVersion.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ async function checkProductionCLIVersion() {
9393
}
9494

9595
export async function checkVersion() {
96+
// Disable auto-upgrade if env var is set
97+
if (process.env.SF_CLI_DISABLE_AUTO_UPGRADE) {
98+
return;
99+
}
100+
96101
// Skip version check if running upgrade command
97102
const args = process.argv.slice(2);
98103
if (args[0] === "upgrade") return;

0 commit comments

Comments
 (0)