This commit is contained in:
Levi committed 2025-03-14 22:05:55 +08:00
1 parent 08603f9510
commit 3ddbc11378
11 files changed
+137 -16

No files matched your search

@@ -216,8 +216,17 @@ String? _getManifestPath(Browser browser) {
return Util.homePathJoin(manifestName);
}
final home =
Platform.environment['HOME'] ?? Platform.environment['USERPROFILE'];
String? home;
if (Platform.isMacOS) {
try {
final user = Process.runSync("id", ["-un"]).stdout.trim();
home = '/Users/$user';
} catch (e) {
// ignore
}
}
home ??= Platform.environment['HOME'] ?? Platform.environment['USERPROFILE'];
if (home == null) return null;
if (Platform.isMacOS) {