mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
🐛 Fix(custom): fix shell-path usage for macos
This commit is contained in:
12
README.md
12
README.md
@@ -251,12 +251,12 @@ brew uninstall piclist
|
|||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
|||||||
12
README_cn.md
12
README_cn.md
@@ -252,12 +252,12 @@ brew uninstall piclist
|
|||||||
|
|
||||||
## 应用截图
|
## 应用截图
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
## 开发说明
|
## 开发说明
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { shellPath } from 'shell-path'
|
import { shellPathSync } from 'shell-path'
|
||||||
|
|
||||||
export default function fixPath () {
|
export default function fixPath () {
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
@@ -6,5 +6,5 @@ export default function fixPath () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
process.env.PATH =
|
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(':')
|
||||||
}
|
}
|
||||||
|
|||||||
4
src/universal/types/globals.d.ts
vendored
4
src/universal/types/globals.d.ts
vendored
@@ -4,7 +4,5 @@ declare module 'ssh2-no-cpu-features' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module 'shell-path' {
|
declare module 'shell-path' {
|
||||||
export const shellPath: {
|
export const shellPathSync: () => string | null
|
||||||
sync: () => string
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user