From 8102246e162098d9cd176c99d9bec44ed4d661ab Mon Sep 17 00:00:00 2001 From: Kuingsmile <96409857+Kuingsmile@users.noreply.github.com> Date: Thu, 14 Aug 2025 10:10:48 +0800 Subject: [PATCH] :bug: Fix(custom): fix shell-path usage for macos --- README.md | 12 ++++++------ README_cn.md | 12 ++++++------ src/main/lifeCycle/fixPath.ts | 4 ++-- src/universal/types/globals.d.ts | 4 +--- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 8d96d28e..7657bbc8 100644 --- a/README.md +++ b/README.md @@ -251,12 +251,12 @@ brew uninstall piclist ## Screenshots -![Upload interface](./imgs/upload.png) -![Album view](./imgs/gallery.png) -![Cloud management](./imgs/cloud_storage.png) -![Settings](./imgs/settings.png) -![Image editing](./imgs/image_editing.png) -![Dark theme](./imgs/dark.png) +![Upload interface](https://github.com/Kuingsmile/PicList/blob/dev/imgs/upload.png?raw=true) +![Album view](https://github.com/Kuingsmile/PicList/blob/dev/imgs/gallery.png?raw=true) +![Cloud management](https://github.com/Kuingsmile/PicList/blob/dev/imgs/cloud_storage.png?raw=true) +![Settings](https://github.com/Kuingsmile/PicList/blob/dev/imgs/settings.png?raw=true) +![Image editing](https://github.com/Kuingsmile/PicList/blob/dev/imgs/image_editing.png?raw=true) +![Dark theme](https://github.com/Kuingsmile/PicList/blob/dev/imgs/dark.png?raw=true) ## Development diff --git a/README_cn.md b/README_cn.md index b28daf2a..b78ca42b 100644 --- a/README_cn.md +++ b/README_cn.md @@ -252,12 +252,12 @@ brew uninstall piclist ## 应用截图 -![上传界面](./imgs/upload.png) -![相册视图](./imgs/gallery.png) -![云存储管理](./imgs/cloud_storage.png) -![设置页面](./imgs/settings.png) -![图像编辑](./imgs/image_editing.png) -![深色主题](./imgs/dark.png) +![上传界面](https://github.com/Kuingsmile/PicList/blob/dev/imgs/upload.png?raw=true) +![相册视图](https://github.com/Kuingsmile/PicList/blob/dev/imgs/gallery.png?raw=true) +![云存储管理](https://github.com/Kuingsmile/PicList/blob/dev/imgs/cloud_storage.png?raw=true) +![设置页面](https://github.com/Kuingsmile/PicList/blob/dev/imgs/settings.png?raw=true) +![图像编辑](https://github.com/Kuingsmile/PicList/blob/dev/imgs/image_editing.png?raw=true) +![深色主题](https://github.com/Kuingsmile/PicList/blob/dev/imgs/dark.png?raw=true) ## 开发说明 diff --git a/src/main/lifeCycle/fixPath.ts b/src/main/lifeCycle/fixPath.ts index 84a847f0..cacd747f 100644 --- a/src/main/lifeCycle/fixPath.ts +++ b/src/main/lifeCycle/fixPath.ts @@ -1,4 +1,4 @@ -import { shellPath } from 'shell-path' +import { shellPathSync } from 'shell-path' export default function fixPath () { if (process.platform === 'win32') { @@ -6,5 +6,5 @@ export default function fixPath () { } process.env.PATH = - shellPath.sync() || ['./node_modules/.bin', '/.nodebrew/current/bin', '/usr/local/bin', process.env.PATH].join(':') + shellPathSync() || ['./node_modules/.bin', '/.nodebrew/current/bin', '/usr/local/bin', process.env.PATH].join(':') } diff --git a/src/universal/types/globals.d.ts b/src/universal/types/globals.d.ts index 4b56517e..68b4e806 100644 --- a/src/universal/types/globals.d.ts +++ b/src/universal/types/globals.d.ts @@ -4,7 +4,5 @@ declare module 'ssh2-no-cpu-features' { } declare module 'shell-path' { - export const shellPath: { - sync: () => string - } + export const shellPathSync: () => string | null }