Skip to content

Commit a4ce62b

Browse files
authored
only pass string args ('script') if they are not null. (#77)
fixes #64
1 parent 84e8a00 commit a4ce62b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/serious_python_linux/lib/serious_python_linux.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ class SeriousPythonLinux extends SeriousPythonPlatform {
3030
final Map<String, dynamic> arguments = {
3131
'exePath': Platform.resolvedExecutable,
3232
'appPath': appPath,
33-
'script': script,
3433
'modulePaths': modulePaths,
3534
'environmentVariables': environmentVariables,
3635
'sync': sync
3736
};
37+
if (script != null) {
38+
arguments['script'] = script;
39+
}
3840
return await methodChannel.invokeMethod<String>('runPython', arguments);
3941
}
4042
}

0 commit comments

Comments
 (0)