diff --git a/.changes/next-release/Bug Fix-0d02e676-f277-4883-bea5-70eb36a76cef.json b/.changes/next-release/Bug Fix-0d02e676-f277-4883-bea5-70eb36a76cef.json new file mode 100644 index 00000000..eab9fa17 --- /dev/null +++ b/.changes/next-release/Bug Fix-0d02e676-f277-4883-bea5-70eb36a76cef.json @@ -0,0 +1,4 @@ +{ + "type": "Bug Fix", + "description": "Fix for installing aws.lambda.tools along side nuget.config with private nuget-feed." +} diff --git a/Tasks/Common/dotNetCliWrapper.ts b/Tasks/Common/dotNetCliWrapper.ts index 80ad1abf..8666ebdf 100644 --- a/Tasks/Common/dotNetCliWrapper.ts +++ b/Tasks/Common/dotNetCliWrapper.ts @@ -48,7 +48,15 @@ export class DotNetCliWrapper { private async updateGlobalTools(): Promise { try { - const returnCode = await this.execute(['tool', 'update', '-g', 'Amazon.Lambda.Tools'], '') + const returnCode = await this.execute( + [ + 'tool', + 'update', + "-g --ignore-failed-sourced --add-source https://api.nuget.org/v3/index.json --version '*'", + 'Amazon.Lambda.Tools' + ], + '' + ) if (returnCode === 0) { return true } else { @@ -65,7 +73,15 @@ export class DotNetCliWrapper { private async installGlobalTools(): Promise { try { - const returnCode = await this.execute(['tool', 'install', '-g', 'Amazon.Lambda.Tools'], '') + const returnCode = await this.execute( + [ + 'tool', + 'install', + "-g --ignore-failed-sourced --add-source https://api.nuget.org/v3/index.json --version '*'", + 'Amazon.Lambda.Tools' + ], + '' + ) if (returnCode === 0) { return true } else {