mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
fix path.join failing due to undefined process.env.DOTNET_ROOT (#1306)
This commit is contained in:
@@ -748,11 +748,19 @@ function getVersion() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isDotNetInstalled() {
|
function isDotNetInstalled() {
|
||||||
let dotnetPath = path.join(process.env.DOTNET_ROOT, 'dotnet');
|
let dotnetPath;
|
||||||
if (!process.env.DOTNET_ROOT || !fs.existsSync(dotnetPath)) {
|
|
||||||
|
if (process.env.DOTNET_ROOT) {
|
||||||
|
dotnetPath = path.join(process.env.DOTNET_ROOT, 'dotnet');
|
||||||
|
if (!fs.existsSync(dotnetPath)) {
|
||||||
|
// fallback to command
|
||||||
|
dotnetPath = 'dotnet';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// fallback to command
|
// fallback to command
|
||||||
dotnetPath = 'dotnet';
|
dotnetPath = 'dotnet';
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Checking for .NET installation at:', dotnetPath);
|
console.log('Checking for .NET installation at:', dotnetPath);
|
||||||
|
|
||||||
// Fallback to system .NET runtime
|
// Fallback to system .NET runtime
|
||||||
|
|||||||
Reference in New Issue
Block a user