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
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 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 () {
|
||||
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(':')
|
||||
}
|
||||
|
||||
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' {
|
||||
export const shellPath: {
|
||||
sync: () => string
|
||||
}
|
||||
export const shellPathSync: () => string | null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user