mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-19 19:19:03 +00:00
feat(macOS): add support for user-only Notion installs
This commit is contained in:
parent
35d9c915b1
commit
998218e554
@ -57,7 +57,12 @@ function getNotionResources() {
|
|||||||
let folder = '';
|
let folder = '';
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
folder = '/Applications/Notion.app/Contents/Resources';
|
for (let loc of [
|
||||||
|
`/Users/${process.env.USER}/Applications/Notion.app/Contents/Resources`, // Notion is installed only for the current user
|
||||||
|
'/Applications/Notion.app/Contents/Resources' // Notion is installed globally
|
||||||
|
]) {
|
||||||
|
if (fs.pathExistsSync(loc)) folder = loc;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'win32':
|
case 'win32':
|
||||||
folder = process.env.LOCALAPPDATA + '\\Programs\\Notion\\resources';
|
folder = process.env.LOCALAPPDATA + '\\Programs\\Notion\\resources';
|
||||||
|
Loading…
Reference in New Issue
Block a user