Skip to content

Commit

Permalink
fix: runtime dir when packaged is different
Browse files Browse the repository at this point in the history
Ref #411
  • Loading branch information
smolck committed Sep 30, 2021
1 parent 0f055ce commit 865180d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/core/master-control.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { app } from 'electron'
import { asColor, merge, getPipeName } from '../../common/utils'
import Worker, { Worker as WorkerType } from '../workers/messaging/worker'
import { Color, Highlight } from '../neovim/types'
Expand Down Expand Up @@ -39,7 +40,10 @@ const spawnNvimInstance = (
useWsl: boolean,
nvimBinary?: string
) => {
const runtimeDir = resolve(__dirname, '..', '..', '..', 'runtime')
// TODO(smolck): See https://github.com/smolck/uivonim/issues/411#issue-1011598155, runtime
// files are in a different place when app is packaged so that's why this exists. Feels kinda
// hacky though.
const runtimeDir = app.isPackaged ? resolve(__dirname, '..', '..', 'runtime') : resolve(__dirname, '..', '..', '..', 'runtime')
const args = [
'--cmd',
`let $PATH .= ':${runtimeDir}/${process.platform}' | let &runtimepath .= ',${runtimeDir}'`,
Expand Down

0 comments on commit 865180d

Please sign in to comment.