#87 new: auto ask add system key (~/.ssh/id_rsa)

This commit is contained in:
lollipopkit
2023-08-04 21:46:44 +08:00
parent 60507ea4bc
commit 91967e6ce3
19 changed files with 129 additions and 76 deletions

View File

@@ -77,13 +77,12 @@ String pathJoin(String path1, String path2) {
return path1 + (path1.endsWith('/') ? '' : '/') + path2;
}
String getHome() {
String? home = "";
Map<String, String> envVars = Platform.environment;
if (isMacOS ||isLinux) {
home = envVars['HOME'];
String? getHomeDir() {
final envVars = Platform.environment;
if (isMacOS || isLinux) {
return envVars['HOME'];
} else if (isWindows) {
home = envVars['UserProfile'];
return envVars['UserProfile'];
}
return home??"";
return null;
}