getConfigDir function
Gets the Kumiho configuration directory.
Returns the path specified by KUMIHO_CONFIG_DIR if set,
otherwise returns ~/.kumiho.
Implementation
Directory getConfigDir() {
final envDir = Platform.environment[AuthEnvVars.configDir];
if (envDir != null && envDir.isNotEmpty) {
return Directory(envDir);
}
final home = Platform.environment['HOME'] ??
Platform.environment['USERPROFILE'] ??
'.';
return Directory('$home/.kumiho');
}