1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-06-24 21:25:23 +00:00

Fix hostname query on non-systemd distributions

This commit is contained in:
Michael Hollister 2024-10-04 17:28:52 -05:00
parent 4524a0ee6a
commit be93dcf03d

View file

@ -13,8 +13,7 @@ export class DiscoveryService {
case "darwin":
return cp.execSync("scutil --get ComputerName").toString().trim();
case "linux":
const prettyname = cp.execSync("hostnamectl --pretty").toString().trim();
return prettyname === "" ? os.hostname() : prettyname;
return os.hostname();
default:
return os.hostname();
}