fix minor updater bugs

This commit is contained in:
Vendicated 2024-03-30 00:28:15 +01:00 committed by Luna
parent 6c4a273a5c
commit 05bf8f35b4
2 changed files with 4 additions and 3 deletions

View file

@ -28,7 +28,7 @@ const VENCORD_SRC_DIR = join(__dirname, "..");
const execFile = promisify(cpExecFile);
const isFlatpak = process.platform === "linux" && Boolean(process.env.FLATPAK_ID?.includes("discordapp") || process.env.FLATPAK_ID?.includes("Discord"));
const isFlatpak = process.platform === "linux" && !!process.env.FLATPAK_ID;
if (process.platform === "darwin") process.env.PATH = `/usr/local/bin:${process.env.PATH}`;
@ -60,7 +60,8 @@ async function calculateGitChanges() {
return commits ? commits.split("\n").map(line => {
const [author, hash, ...rest] = line.split("/");
return {
hash, author, message: rest.join("/")
hash, author,
message: rest.join("/").split("\n")[0]
};
}) : [];
}

View file

@ -53,7 +53,7 @@ async function calculateGitChanges() {
// github api only sends the long sha
hash: c.sha.slice(0, 7),
author: c.author.login,
message: c.commit.message.substring(c.commit.message.indexOf("\n") + 1)
message: c.commit.message.split("\n")[0]
}));
}