Support disabling version check (#2648)
* Support disabling version check * Update docs * Move the bypass logic back to update checking function * fix linting * fix linting (again)
This commit is contained in:
@@ -38,6 +38,7 @@ export const WG_ENV = {
|
||||
/** If IPv6 should be disabled */
|
||||
DISABLE_IPV6: process.env.DISABLE_IPV6 === 'true',
|
||||
WG_EXECUTABLE: await detectAwg(),
|
||||
DISABLE_VERSION_CHECK: process.env.DISABLE_VERSION_CHECK === 'true',
|
||||
};
|
||||
|
||||
export const WG_INITIAL_ENV = {
|
||||
|
||||
@@ -4,6 +4,13 @@ type GithubRelease = {
|
||||
};
|
||||
|
||||
async function fetchLatestRelease() {
|
||||
if (WG_ENV.DISABLE_VERSION_CHECK) {
|
||||
return {
|
||||
version: RELEASE,
|
||||
changelog: '',
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await $fetch<GithubRelease>(
|
||||
'https://api.github.com/repos/wg-easy/wg-easy/releases/latest',
|
||||
|
||||
Reference in New Issue
Block a user