shellCommand function
The shell that runs script commands: /bin/sh on macOS and Linux, and
cmd.exe on Windows. Scripts run in the same shell for every teammate,
whatever their login shell is.
Implementation
({String executable, List<String> arguments}) shellCommand(
String command, {
bool? windows,
}) {
if (windows ?? Platform.isWindows) {
return (
executable: Platform.environment['COMSPEC'] ?? 'cmd.exe',
arguments: ['/d', '/s', '/c', command],
);
}
return (executable: '/bin/sh', arguments: ['-c', command]);
}