Skip to content

Commit bae3d1b

Browse files
committed
Fixed check
Signed-off-by: Arnau Mora <[email protected]>
1 parent 62dedab commit bae3d1b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/kotlin/distribution/FCMNotifier.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ internal object FCMNotifier : Notifier {
2323

2424
override fun initialize() {
2525
val saf = EnvironmentVariables.Services.GoogleCredentials.ServiceAccountFile
26-
if (!saf.isSet) {
27-
Logger.info("Google service account file not set. Device notifications will not be sent.")
26+
val serviceAccountFile = File(saf.value!!)
27+
28+
if (!serviceAccountFile.exists()) {
29+
Logger.info("Google service account file not found. Device notifications will not be sent.")
2830
return
2931
}
30-
val serviceAccountFile = File(saf.value!!)
3132

3233
Logger.debug("Initializing Firebase with service account file: $serviceAccountFile")
3334
val options = FirebaseOptions.builder()

0 commit comments

Comments
 (0)