Skip to content

Commit

Permalink
refactor(CLI): Recognize SLS_DISABLE_AUTO_UPDATE env var
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrzesik committed Mar 17, 2022
1 parent 9f6f6bb commit c939457
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/utils/eventually-update.js
Expand Up @@ -82,6 +82,9 @@ const standaloneUpdate = async (serverless, { newVersion, abortHandler }) => {

module.exports = async (serverless) => {
if (!serverless.onExitPromise) return; // Not intended for programmatic Serverless instances
// Below env var is intended to be used by `serverless-compose` with subprocess approach
// TODO: Remove it after it is no longer used by it
if (process.env.SLS_DISABLE_AUTO_UPDATE) return;
if (isLocallyInstalled) return;
if (serverless.isStandaloneExecutable) {
if (process.platform === 'win32') return;
Expand Down

0 comments on commit c939457

Please sign in to comment.