mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-24 18:12:48 +03:00
fix: log and show toast (#4965)
This commit is contained in:
parent
3bed869ded
commit
a7325e4d2d
@ -158,25 +158,21 @@ export class ProjectService {
|
||||
return path;
|
||||
}
|
||||
|
||||
validateProjectPath(path: string, showErrors = true) {
|
||||
validateProjectPath(path: string) {
|
||||
if (/^\\\\wsl.localhost/i.test(path)) {
|
||||
if (showErrors) {
|
||||
showError(
|
||||
'Use the Linux version of GitButler',
|
||||
'For WSL2 projects, install the Linux version of GitButler inside of your WSL2 distro'
|
||||
);
|
||||
}
|
||||
const errorMsg =
|
||||
'For WSL2 projects, install the Linux version of GitButler inside of your WSL2 distro';
|
||||
console.error(errorMsg);
|
||||
showError('Use the Linux version of GitButler', errorMsg);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (/^\\\\/i.test(path)) {
|
||||
if (showErrors) {
|
||||
showError(
|
||||
'UNC Paths are not directly supported',
|
||||
'Using git across a network is not recommended. Either clone the repo locally, or use the NET USE command to map a network drive'
|
||||
);
|
||||
}
|
||||
const errorMsg =
|
||||
'Using git across a network is not recommended. Either clone the repo locally, or use the NET USE command to map a network drive';
|
||||
console.error(errorMsg);
|
||||
showError('UNC Paths are not directly supported', errorMsg);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user