-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix non-working environment variable import
- Loading branch information
1 parent
f89ed6c
commit f6c62ed
Showing
4 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import * as env from '$env/static/private'; | ||
|
||
export const CI_TEST: boolean = Object.hasOwn(env, 'CI_TEST'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { redirect } from '@sveltejs/kit'; | ||
import type { PageServerLoad } from './$types'; | ||
import { CI_TEST } from '$lib/utils/constants'; | ||
import { CI_TEST } from '$lib/utils/env_constants'; | ||
|
||
const redirectURL = CI_TEST ? '/analytics' : '/analytics?refresh=1'; | ||
console.log(`[NEW_REDIRECT:1] ${CI_TEST}`); | ||
console.log(`[CI_TEST_VALUE:1] ${CI_TEST}`); | ||
|
||
export const load: PageServerLoad = async () => { | ||
console.log(`[NEW_REDIRECT:2] ${CI_TEST}`); | ||
console.log(`[CI_TEST_VALUE:2] ${CI_TEST}`); | ||
redirect(301, redirectURL); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters