mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-22 10:01:40 +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
|
||||
|
||||
cwd?: string
|
||||
|
||||
/**
|
||||
* SVG icon
|
||||
*/
|
||||
|
@ -80,6 +80,7 @@ export class LocalProfilesService extends ProfileProvider<LocalProfile> {
|
||||
command: shell.command,
|
||||
args: shell.args ?? [],
|
||||
env: shell.env,
|
||||
cwd: shell.cwd,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,13 @@ export class MSYS2ShellProvider extends ShellProvider {
|
||||
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']
|
||||
|
||||
return environments.map(e => ({
|
||||
@ -35,6 +42,7 @@ export class MSYS2ShellProvider extends ShellProvider {
|
||||
args: ['-defterm', '-here', '-no-start', '-' + e],
|
||||
icon: require('../icons/msys2.svg'),
|
||||
env: {},
|
||||
cwd: homePath,
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user