mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-23 00:50:19 +00:00
Fix logic
This commit is contained in:
parent
0949c87857
commit
1225bf2b8a
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -337,7 +337,7 @@ class DotnetCoreInstaller {
|
|||||||
if (process.env['no_proxy'] != null) {
|
if (process.env['no_proxy'] != null) {
|
||||||
scriptArguments.push(`-ProxyBypassList ${process.env['no_proxy']}`);
|
scriptArguments.push(`-ProxyBypassList ${process.env['no_proxy']}`);
|
||||||
}
|
}
|
||||||
if (!process.env['DOTNET_INSTALL_DIR']) {
|
if (!dotnetInstallDir) {
|
||||||
scriptArguments.push('-InstallDir', `'${DotnetCoreInstaller.installationDirectoryWindows}'`);
|
scriptArguments.push('-InstallDir', `'${DotnetCoreInstaller.installationDirectoryWindows}'`);
|
||||||
}
|
}
|
||||||
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
|
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
|
||||||
@ -355,7 +355,7 @@ class DotnetCoreInstaller {
|
|||||||
if (this.quality) {
|
if (this.quality) {
|
||||||
this.setQuality(dotnetVersion, scriptArguments);
|
this.setQuality(dotnetVersion, scriptArguments);
|
||||||
}
|
}
|
||||||
if (!process.env['DOTNET_INSTALL_DIR']) {
|
if (!dotnetInstallDir) {
|
||||||
scriptArguments.push('--install-dir', utils_1.IS_LINUX
|
scriptArguments.push('--install-dir', utils_1.IS_LINUX
|
||||||
? DotnetCoreInstaller.installationDirectoryLinux
|
? DotnetCoreInstaller.installationDirectoryLinux
|
||||||
: DotnetCoreInstaller.installationDirectoryMac);
|
: DotnetCoreInstaller.installationDirectoryMac);
|
||||||
@ -365,8 +365,8 @@ class DotnetCoreInstaller {
|
|||||||
if (exitCode) {
|
if (exitCode) {
|
||||||
throw new Error(`Failed to install dotnet ${exitCode}. ${stdout}`);
|
throw new Error(`Failed to install dotnet ${exitCode}. ${stdout}`);
|
||||||
}
|
}
|
||||||
return this.outputDotnetVersion(dotnetVersion.value, process.env['DOTNET_INSTALL_DIR']
|
return this.outputDotnetVersion(dotnetVersion.value, dotnetInstallDir
|
||||||
? process.env['DOTNET_INSTALL_DIR']
|
? dotnetInstallDir
|
||||||
: scriptArguments[scriptArguments.length - 1]);
|
: scriptArguments[scriptArguments.length - 1]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ export class DotnetCoreInstaller {
|
|||||||
scriptArguments.push(`-ProxyBypassList ${process.env['no_proxy']}`);
|
scriptArguments.push(`-ProxyBypassList ${process.env['no_proxy']}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!process.env['DOTNET_INSTALL_DIR']) {
|
if (!dotnetInstallDir) {
|
||||||
scriptArguments.push(
|
scriptArguments.push(
|
||||||
'-InstallDir',
|
'-InstallDir',
|
||||||
`'${DotnetCoreInstaller.installationDirectoryWindows}'`
|
`'${DotnetCoreInstaller.installationDirectoryWindows}'`
|
||||||
@ -235,7 +235,7 @@ export class DotnetCoreInstaller {
|
|||||||
this.setQuality(dotnetVersion, scriptArguments);
|
this.setQuality(dotnetVersion, scriptArguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!process.env['DOTNET_INSTALL_DIR']) {
|
if (!dotnetInstallDir) {
|
||||||
scriptArguments.push(
|
scriptArguments.push(
|
||||||
'--install-dir',
|
'--install-dir',
|
||||||
IS_LINUX
|
IS_LINUX
|
||||||
@ -255,8 +255,8 @@ export class DotnetCoreInstaller {
|
|||||||
|
|
||||||
return this.outputDotnetVersion(
|
return this.outputDotnetVersion(
|
||||||
dotnetVersion.value,
|
dotnetVersion.value,
|
||||||
process.env['DOTNET_INSTALL_DIR']
|
dotnetInstallDir
|
||||||
? process.env['DOTNET_INSTALL_DIR']
|
? dotnetInstallDir
|
||||||
: scriptArguments[scriptArguments.length - 1]
|
: scriptArguments[scriptArguments.length - 1]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user