From d60b459b88971d2cb8b4e23ced42c508a2f12a1f Mon Sep 17 00:00:00 2001 From: 1nikolas <1nikolas@hotmail.gr> Date: Wed, 23 Dec 2020 00:27:14 +0200 Subject: [PATCH] Fix view log on MacOS --- src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 6e649ab..6a75bd8 100644 --- a/src/index.js +++ b/src/index.js @@ -119,7 +119,12 @@ const createWindow = () => { if (result.response === 1) { require('electron').shell.openExternal("https://github.com/1nikolas/tidal-lyrics/"); } else if (result.response === 2) { - require('electron').shell.openExternal(logPath) + if (process.platform == "win32") { + require('electron').shell.openExternal(logPath) + } else if (process.platform == "darwin") { + exec("open -t " + logPath) + } + } })