fix minor updater bugs

main
Vendicated 6 months ago
parent 650f4050e1
commit 69b349da77
No known key found for this signature in database
GPG Key ID: D66986BAF75ECF18

@ -28,7 +28,7 @@ const VENCORD_SRC_DIR = join(__dirname, "..");
const execFile = promisify(cpExecFile); 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}`; 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 => { return commits ? commits.split("\n").map(line => {
const [author, hash, ...rest] = line.split("/"); const [author, hash, ...rest] = line.split("/");
return { return {
hash, author, message: rest.join("/") hash, author,
message: rest.join("/").split("\n")[0]
}; };
}) : []; }) : [];
} }

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

Loading…
Cancel
Save