File tree 1 file changed +1
-21
lines changed
1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -57,33 +57,13 @@ const getDefaultsFromGlobal = (): FirebaseDefaults | undefined =>
57
57
* process.env.__FIREBASE_DEFAULTS_PATH__
58
58
*/
59
59
const getDefaultsFromEnvVariable = ( ) : FirebaseDefaults | undefined => {
60
- if ( typeof process === 'undefined' ) {
60
+ if ( typeof process === 'undefined' || typeof process . env === 'undefined' ) {
61
61
return ;
62
62
}
63
63
const defaultsJsonString = process . env . __FIREBASE_DEFAULTS__ ;
64
- const defaultsJsonPath = process . env . __FIREBASE_DEFAULTS_PATH__ ;
65
64
if ( defaultsJsonString ) {
66
- if ( defaultsJsonPath ) {
67
- console . warn (
68
- `Values were provided for both __FIREBASE_DEFAULTS__ ` +
69
- `and __FIREBASE_DEFAULTS_PATH__. __FIREBASE_DEFAULTS_PATH__ ` +
70
- `will be ignored.`
71
- ) ;
72
- }
73
65
return JSON . parse ( defaultsJsonString ) ;
74
66
}
75
- if ( defaultsJsonPath && typeof require !== 'undefined' ) {
76
- try {
77
- // eslint-disable-next-line @typescript-eslint/no-require-imports
78
- const json = require ( defaultsJsonPath ) ;
79
- return json ;
80
- } catch ( e ) {
81
- console . warn (
82
- `Unable to read defaults from file provided to ` +
83
- `__FIREBASE_DEFAULTS_PATH__: ${ defaultsJsonPath } `
84
- ) ;
85
- }
86
- }
87
67
} ;
88
68
89
69
const getDefaultsFromCookie = ( ) : FirebaseDefaults | undefined => {
You can’t perform that action at this time.
0 commit comments