Skip to content

Commit c4d32a3

Browse files
authored
Reverting 9407 origin/users/magleaso/try catch fix (#9490)
* 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 fa9d269 commit c4d32a3

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
@@ -14,9 +14,13 @@ export async function run(): Promise<void> {
1414
try {
1515
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
1616
} catch (error) {
17-
tl.debug('Unable to get packaging URIs');
17+
tl.debug('Unable to get packaging URIs, using default collection URI');
1818
tl.debug(JSON.stringify(error));
19-
throw new Error(error);
19+
const collectionUrl = tl.getVariable('System.TeamFoundationCollectionUri');
20+
packagingLocation = {
21+
PackagingUris: [collectionUrl],
22+
DefaultPackagingUri: collectionUrl
23+
};
2024
}
2125

2226
const buildIdentityDisplayName: string = null;

Tasks/DotNetCoreCLIV2/restorecommand.ts

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

2226
const buildIdentityDisplayName: string = null;

Tasks/DotNetCoreCLIV2/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"version": {
1818
"Major": 2,
1919
"Minor": 146,
20-
"Patch": 0
20+
"Patch": 1
2121
},
2222
"minimumAgentVersion": "2.115.0",
2323
"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
@@ -17,7 +17,7 @@
1717
"version": {
1818
"Major": 2,
1919
"Minor": 146,
20-
"Patch": 0
20+
"Patch": 1
2121
},
2222
"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`",
2323
"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
@@ -17,7 +17,7 @@
1717
"version": {
1818
"Major": 3,
1919
"Minor": 146,
20-
"Patch": 0
20+
"Patch": 1
2121
},
2222
"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`",
2323
"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
@@ -9,7 +9,7 @@
99
"version": {
1010
"Major": 0,
1111
"Minor": 146,
12-
"Patch": 0
12+
"Patch": 1
1313
},
1414
"runsOn": [
1515
"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)