GitPlatform constructor
GitPlatform({
- required GitOperatingSystem operatingSystem,
- GitPathStyle? pathStyle,
- Map<
String, String> ? environment, - String? currentDirectory,
Creates a platform of operatingSystem, with the pathStyle derived
from it unless given, environment copied and made unmodifiable, and
currentDirectory as the anchor relative paths hang from.
Implementation
GitPlatform({
required this.operatingSystem,
GitPathStyle? pathStyle,
Map<String, String>? environment,
String? currentDirectory,
}) : pathStyle = pathStyle ??
(operatingSystem == GitOperatingSystem.windows
? GitPathStyle.windows
: GitPathStyle.posix),
environment = Map.unmodifiable(environment ?? const <String, String>{}),
currentDirectory = currentDirectory;