File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ export const env = {
3434 MAIL_DRIVER : process . env . MAIL_DRIVER || 'smtp' ,
3535 MAIL_HOST : process . env . MAIL_HOST || 'smtp.mailtrap.io' ,
3636 MAIL_PORT : validate . number ( process . env . MAIL_PORT ) || 587 ,
37- MAIL_FROM : process . env . MAIL_FROM || ' ' ,
38- MAIL_USERNAME : process . env . MAIL_USERNAME || ' ' ,
39- MAIL_PASSWORD : process . env . MAIL_PASSWORD || ' ' ,
40- MAIL_ENCRYPTION : process . env . MAIL_ENCRYPTION || ' ' ,
37+ MAIL_FROM : process . env . MAIL_FROM ,
38+ MAIL_USERNAME : process . env . MAIL_USERNAME ,
39+ MAIL_PASSWORD : process . env . MAIL_PASSWORD ,
40+ MAIL_ENCRYPTION : process . env . MAIL_ENCRYPTION ,
4141}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { addDays } from 'date-fns'
44import fs from 'fs'
55import path from 'path'
66import { logger } from '~/config/logger'
7+ import { storageExists } from '../boolean'
78import { ms } from '../date'
89import { currentDir } from '../string'
910import { GoogleCloudStorageParams , UploadFileParams } from './types'
@@ -22,9 +23,10 @@ export default class GoogleCloudStorage {
2223 this . _expires = params . expires
2324 this . _filepath = path . resolve ( `${ currentDir } /${ params . filepath } ` )
2425
26+ const isStorageEnabled = storageExists ( )
2527 const msgType = `${ green ( 'storage - google cloud storage' ) } `
2628
27- if ( ! this . _access_key && ! fs . existsSync ( this . _filepath ) ) {
29+ if ( isStorageEnabled && ! this . _access_key && ! fs . existsSync ( this . _filepath ) ) {
2830 const message = `${ msgType } serviceAccount is missing on root directory`
2931 logger . error ( message )
3032
You can’t perform that action at this time.
0 commit comments