Skip to content

Commit e297274

Browse files
authored
Reverting 9407 origin/users/magleaso/try catch fix (#9490) (#9493)
* Revert "Adding dockercli installer task in task list (#9358)" This reverts commit d15ac70. * Revert "Porting L0 fixed in m146 (#9424)" This reverts commit 68c9576. * Revert "Fix Failing Catch Block (#9385) (#9407)" This reverts commit b50a4a7. * Bump version
1 parent 87386a4 commit e297274

File tree

24 files changed

+83
-38
lines changed

24 files changed

+83
-38
lines changed

Tasks/DotNetCoreCLIV2/pushcommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ export async function run(): Promise<void> {
1515
try {
1616
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
1717
} catch (error) {
18-
tl.debug('Unable to get packaging URIs');
18+
tl.debug('Unable to get packaging URIs, using default collection URI');
1919
tl.debug(JSON.stringify(error));
20-
throw new Error(error);
20+
const collectionUrl = tl.getVariable('System.TeamFoundationCollectionUri');
21+
packagingLocation = {
22+
PackagingUris: [collectionUrl],
23+
DefaultPackagingUri: collectionUrl
24+
};
2125
}
2226

2327
const buildIdentityDisplayName: string = null;

Tasks/DotNetCoreCLIV2/restorecommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ export async function run(): Promise<void> {
1515
try {
1616
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
1717
} catch (error) {
18-
tl.debug('Unable to get packaging URIs');
18+
tl.debug('Unable to get packaging URIs, using default collection URI');
1919
tl.debug(JSON.stringify(error));
20-
throw new Error(error);
20+
const collectionUrl = tl.getVariable('System.TeamFoundationCollectionUri');
21+
packagingLocation = {
22+
PackagingUris: [collectionUrl],
23+
DefaultPackagingUri: collectionUrl
24+
};
2125
}
2226

2327
const buildIdentityDisplayName: string = null;

Tasks/DotNetCoreCLIV2/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"version": {
1919
"Major": 2,
2020
"Minor": 147,
21-
"Patch": 1
21+
"Patch": 2
2222
},
2323
"minimumAgentVersion": "2.115.0",
2424
"instanceNameFormat": "dotnet $(command)",

Tasks/MavenV2/mavenutil.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,12 @@ async function collectFeedRepositories(pomContents:string): Promise<any> {
199199
try {
200200
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.Maven);
201201
} catch (error) {
202-
tl.debug("Unable to get packaging URIs");
202+
tl.debug("Unable to get packaging URIs, using default collection URI");
203203
tl.debug(JSON.stringify(error));
204-
throw new Error(error);
204+
packagingLocation = {
205+
PackagingUris: [collectionUrl],
206+
DefaultPackagingUri: collectionUrl
207+
};
205208
}
206209

207210
let packageUrl = packagingLocation.DefaultPackagingUri;

Tasks/MavenV2/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"version": {
1919
"Major": 2,
2020
"Minor": 147,
21-
"Patch": 0
21+
"Patch": 1
2222
},
2323
"releaseNotes": "Configuration of the SonarQube analysis was moved to the [SonarQube](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube) or [SonarCloud](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud) extensions, in task `Prepare Analysis Configuration`",
2424
"demands": [

Tasks/MavenV3/mavenutil.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,11 @@ async function collectFeedRepositories(pomContents:string): Promise<any> {
199199
try {
200200
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.Maven);
201201
} catch (error) {
202-
tl.debug("Unable to get packaging URIs");
202+
tl.debug("Unable to get packaging URIs, using default collection URI");
203203
tl.debug(JSON.stringify(error));
204-
throw new Error(error);
204+
packagingLocation = {
205+
PackagingUris: [collectionUrl],
206+
DefaultPackagingUri: collectionUrl};
205207
}
206208

207209
let packageUrl = packagingLocation.DefaultPackagingUri;

Tasks/MavenV3/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"version": {
1919
"Major": 3,
2020
"Minor": 147,
21-
"Patch": 0
21+
"Patch": 1
2222
},
2323
"releaseNotes": "Configuration of the SonarQube analysis was moved to the [SonarQube](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube) or [SonarCloud](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud) extensions, in task `Prepare Analysis Configuration`",
2424
"demands": [

Tasks/NpmAuthenticateV0/npmauth.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,13 @@ async function main(): Promise<void> {
7171
try {
7272
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.Npm);
7373
} catch (error) {
74-
tl.debug('Unable to get packaging URIs');
74+
tl.debug('Unable to get packaging URIs, using default collection URI');
7575
tl.debug(JSON.stringify(error));
76-
throw new Error(error);
76+
const collectionUrl = tl.getVariable('System.TeamFoundationCollectionUri');
77+
packagingLocation = {
78+
PackagingUris: [collectionUrl],
79+
DefaultPackagingUri: collectionUrl
80+
};
7781
}
7882
let LocalNpmRegistries = await npmutil.getLocalNpmRegistries(workingDirectory, packagingLocation.PackagingUris);
7983

Tasks/NpmAuthenticateV0/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"version": {
1111
"Major": 0,
1212
"Minor": 147,
13-
"Patch": 1
13+
"Patch": 2
1414
},
1515
"runsOn": [
1616
"Agent",

Tasks/NpmV0/npmtask.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,12 @@ async function addBuildCredProviderEnv(env: EnvironmentDictionary) : Promise<Env
198198
try {
199199
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.Npm);
200200
} catch (error) {
201-
tl.debug("Unable to get packaging URIs");
201+
tl.debug("Unable to get packaging URIs, using default collection URI");
202202
tl.debug(JSON.stringify(error));
203-
throw new Error(error);
203+
const collectionUrl = tl.getVariable("System.TeamFoundationCollectionUri");
204+
packagingLocation = {
205+
PackagingUris: [collectionUrl],
206+
DefaultPackagingUri: collectionUrl};
204207
}
205208

206209
var urlPrefixes : string[] = packagingLocation.PackagingUris;

0 commit comments

Comments
 (0)