CliTool constructor
CliTool(
{ - required String executable,
- int? windowsCodePage = WindowsCodePage.utf8,
})
Implementation
CliTool({
required String executable,
this.windowsCodePage = WindowsCodePage.utf8,
}) : originalExecutable = executable {
if (io.Platform.isWindows && null != windowsCodePage) {
final script = createWindowsScript(
windowsCodePage: windowsCodePage,
contents: """
REM Forward arguments to the actual executable
$executable %*
""",
);
this.executable = script.path;
} else {
this.executable = executable;
}
}