diff --git a/src/main/updater/git.ts b/src/main/updater/git.ts index 82c38b6bc..1955f7dce 100644 --- a/src/main/updater/git.ts +++ b/src/main/updater/git.ts @@ -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] }; }) : []; } diff --git a/src/main/updater/http.ts b/src/main/updater/http.ts index 9e5a1cef4..0738a8c24 100644 --- a/src/main/updater/http.ts +++ b/src/main/updater/http.ts @@ -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] })); }