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:
parent
f8850a9be8
commit
9738c4c81b
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue