Skip to content

feat(Version Check): Support disable fun version check#548

Merged
ChanDaoH merged 1 commit into
masterfrom
zechen/feat-fun-disable-version-check
Oct 22, 2019
Merged

feat(Version Check): Support disable fun version check#548
ChanDaoH merged 1 commit into
masterfrom
zechen/feat-fun-disable-version-check

Conversation

@ChanDaoH
Copy link
Copy Markdown
Collaborator

提供 FUN_DISABLE_VERSION_CHECK 环境变量,当设置了该环境变量并且值不为 '0''false' 时,不进行 fun 版本检测提示

@ChanDaoH ChanDaoH requested review from tanhe123 and vangie October 22, 2019 09:29
Comment thread lib/update-notifier.js
const notifier = require('update-notifier');
const pkg = require('../package.json');

const FUN_DISABLE_VERSION_CHECK = 'FUN_DISABLE_VERSION_CHECK';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的值写成 false 好理解一些?

Comment thread lib/update-notifier.js
Comment on lines +8 to +13
const disableVersionCheck = process.env[FUN_DISABLE_VERSION_CHECK];
if (
disableVersionCheck !== undefined &&
disableVersionCheck !== '0' &&
disableVersionCheck !== 'false'
) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没写成 if (disableVersionCheck) ,是有啥特殊考虑?

@ChanDaoH ChanDaoH merged commit 62c87fc into master Oct 22, 2019
@ChanDaoH ChanDaoH deleted the zechen/feat-fun-disable-version-check branch October 22, 2019 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants