mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-22 18:11:43 +03:00
msys2: set correct starting directory - fixes #6079
This commit is contained in:
parent
3a012878d0
commit
94b3212afb
@ -13,6 +13,8 @@ export interface Shell {
|
|||||||
*/
|
*/
|
||||||
fsBase?: string
|
fsBase?: string
|
||||||
|
|
||||||
|
cwd?: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SVG icon
|
* SVG icon
|
||||||
*/
|
*/
|
||||||
|
@ -80,6 +80,7 @@ export class LocalProfilesService extends ProfileProvider<LocalProfile> {
|
|||||||
command: shell.command,
|
command: shell.command,
|
||||||
args: shell.args ?? [],
|
args: shell.args ?? [],
|
||||||
env: shell.env,
|
env: shell.env,
|
||||||
|
cwd: shell.cwd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,13 @@ export class MSYS2ShellProvider extends ShellProvider {
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let homePath: string|undefined = path.resolve(msys2Path, 'home', process.env.USERNAME!)
|
||||||
|
try {
|
||||||
|
await fs.access(msys2Path)
|
||||||
|
} catch {
|
||||||
|
homePath = undefined
|
||||||
|
}
|
||||||
|
|
||||||
const environments = ['msys', 'mingw64', 'clang64', 'ucrt64']
|
const environments = ['msys', 'mingw64', 'clang64', 'ucrt64']
|
||||||
|
|
||||||
return environments.map(e => ({
|
return environments.map(e => ({
|
||||||
@ -35,6 +42,7 @@ export class MSYS2ShellProvider extends ShellProvider {
|
|||||||
args: ['-defterm', '-here', '-no-start', '-' + e],
|
args: ['-defterm', '-here', '-no-start', '-' + e],
|
||||||
icon: require('../icons/msys2.svg'),
|
icon: require('../icons/msys2.svg'),
|
||||||
env: {},
|
env: {},
|
||||||
|
cwd: homePath,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user