Fix null safety issue with environment variable access

Added a non-null assertion operator to ensure 'FLET_APP_STORAGE_TEMP' is not null when constructing the socket address path.
This commit is contained in:
Feodor Fitsner 2025-12-15 18:26:50 -08:00
parent f8850a9be8
commit 9738c4c81b
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ Future<String?> runPythonApp(List<String> args) async {
'Python output TCP Server is listening on port ${outSocketServer.port}'); 'Python output TCP Server is listening on port ${outSocketServer.port}');
socketAddr = "$tcpAddr:${outSocketServer.port}"; socketAddr = "$tcpAddr:${outSocketServer.port}";
} else { } else {
socketAddr = path.join(environmentVariables["FLET_APP_STORAGE_TEMP"], "stdout_$pid.sock"); socketAddr = path.join(environmentVariables["FLET_APP_STORAGE_TEMP"]!, "stdout_$pid.sock");
if (await File(socketAddr).exists()) { if (await File(socketAddr).exists()) {
await File(socketAddr).delete(); await File(socketAddr).delete();
} }