Skip to content

Commit f72ad72

Browse files
committed
macOS support finalized
1 parent dffbbb9 commit f72ad72

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/Utils/Desktop.vala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,9 @@ public class He.Desktop : GLib.Object {
130130
}
131131

132132
private static string? macos_defaults_read (string domain, string key) {
133-
// Use argv spawn (no shell, no quoting issues, no PATH dependency).
134-
string stdout_str;
135-
string stderr_str;
136-
int status;
133+
string? stdout_str = null;
134+
string? stderr_str = null;
135+
int status = 0;
137136

138137
string[] argv;
139138

@@ -148,7 +147,7 @@ public class He.Desktop : GLib.Object {
148147
null,
149148
argv,
150149
null,
151-
GLib.SpawnFlags.STDERR_TO_DEV_NULL,
150+
GLib.SpawnFlags.STDOUT_TO_DEV_NULL,
152151
null,
153152
out stdout_str,
154153
out stderr_str,
@@ -158,7 +157,7 @@ public class He.Desktop : GLib.Object {
158157
return null;
159158
}
160159

161-
if (status != 0) {
160+
if (status != 0 || stdout_str == null) {
162161
return null;
163162
}
164163

0 commit comments

Comments
 (0)