Skip to content

Commit

Permalink
Reverting 9407 origin/users/magleaso/try catch fix (#9490)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
satbai committed Feb 1, 2019
1 parent 87386a4 commit 47de988
Show file tree
Hide file tree
Showing 24 changed files with 83 additions and 38 deletions.
8 changes: 6 additions & 2 deletions Tasks/DotNetCoreCLIV2/pushcommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ export async function run(): Promise<void> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
} catch (error) {
tl.debug('Unable to get packaging URIs');
tl.debug('Unable to get packaging URIs, using default collection URI');
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable('System.TeamFoundationCollectionUri');
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl
};
}

const buildIdentityDisplayName: string = null;
Expand Down
8 changes: 6 additions & 2 deletions Tasks/DotNetCoreCLIV2/restorecommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ export async function run(): Promise<void> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
} catch (error) {
tl.debug('Unable to get packaging URIs');
tl.debug('Unable to get packaging URIs, using default collection URI');
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable('System.TeamFoundationCollectionUri');
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl
};
}

const buildIdentityDisplayName: string = null;
Expand Down
2 changes: 1 addition & 1 deletion Tasks/DotNetCoreCLIV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 2,
"Minor": 147,
"Patch": 1
"Patch": 2
},
"minimumAgentVersion": "2.115.0",
"instanceNameFormat": "dotnet $(command)",
Expand Down
7 changes: 5 additions & 2 deletions Tasks/MavenV2/mavenutil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,12 @@ async function collectFeedRepositories(pomContents:string): Promise<any> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.Maven);
} catch (error) {
tl.debug("Unable to get packaging URIs");
tl.debug("Unable to get packaging URIs, using default collection URI");
tl.debug(JSON.stringify(error));
throw new Error(error);
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl
};
}

let packageUrl = packagingLocation.DefaultPackagingUri;
Expand Down
2 changes: 1 addition & 1 deletion Tasks/MavenV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 2,
"Minor": 147,
"Patch": 0
"Patch": 1
},
"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`",
"demands": [
Expand Down
6 changes: 4 additions & 2 deletions Tasks/MavenV3/mavenutil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,11 @@ async function collectFeedRepositories(pomContents:string): Promise<any> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.Maven);
} catch (error) {
tl.debug("Unable to get packaging URIs");
tl.debug("Unable to get packaging URIs, using default collection URI");
tl.debug(JSON.stringify(error));
throw new Error(error);
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl};
}

let packageUrl = packagingLocation.DefaultPackagingUri;
Expand Down
2 changes: 1 addition & 1 deletion Tasks/MavenV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 3,
"Minor": 147,
"Patch": 0
"Patch": 1
},
"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`",
"demands": [
Expand Down
8 changes: 6 additions & 2 deletions Tasks/NpmAuthenticateV0/npmauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,13 @@ async function main(): Promise<void> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.Npm);
} catch (error) {
tl.debug('Unable to get packaging URIs');
tl.debug('Unable to get packaging URIs, using default collection URI');
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable('System.TeamFoundationCollectionUri');
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl
};
}
let LocalNpmRegistries = await npmutil.getLocalNpmRegistries(workingDirectory, packagingLocation.PackagingUris);

Expand Down
2 changes: 1 addition & 1 deletion Tasks/NpmAuthenticateV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": {
"Major": 0,
"Minor": 147,
"Patch": 1
"Patch": 2
},
"runsOn": [
"Agent",
Expand Down
7 changes: 5 additions & 2 deletions Tasks/NpmV0/npmtask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,12 @@ async function addBuildCredProviderEnv(env: EnvironmentDictionary) : Promise<Env
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.Npm);
} catch (error) {
tl.debug("Unable to get packaging URIs");
tl.debug("Unable to get packaging URIs, using default collection URI");
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable("System.TeamFoundationCollectionUri");
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl};
}

var urlPrefixes : string[] = packagingLocation.PackagingUris;
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NpmV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": {
"Major": 0,
"Minor": 147,
"Patch": 0
"Patch": 1
},
"runsOn": [
"Agent",
Expand Down
8 changes: 6 additions & 2 deletions Tasks/NpmV1/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ async function main(): Promise<void> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.Npm);
} catch (error) {
tl.debug('Unable to get packaging URIs');
tl.debug('Unable to get packaging URIs, using default collection URI');
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable('System.TeamFoundationCollectionUri');
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl
};
}
const forcedUrl = tl.getVariable('Npm.PackagingCollectionUrl');
if (forcedUrl) {
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NpmV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": {
"Major": 1,
"Minor": 147,
"Patch": 3
"Patch": 4
},
"runsOn": [
"Agent",
Expand Down
7 changes: 5 additions & 2 deletions Tasks/NuGetCommandV2/nugetcustom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ export async function run(nuGetPath: string): Promise<void> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
} catch (error) {
tl.debug("Unable to get packaging URIs");
tl.debug("Unable to get packaging URIs, using default collection URI");
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable("System.TeamFoundationCollectionUri");
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl};
}

nutil.setConsoleCodePage();
Expand Down
7 changes: 5 additions & 2 deletions Tasks/NuGetCommandV2/nugetpublisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ export async function run(nuGetPath: string): Promise<void> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
} catch (error) {
tl.debug("Unable to get packaging URIs");
tl.debug("Unable to get packaging URIs, using default collection URI");
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable("System.TeamFoundationCollectionUri");
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl};
}

const buildIdentityDisplayName: string = null;
Expand Down
7 changes: 5 additions & 2 deletions Tasks/NuGetCommandV2/nugetrestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ export async function run(nuGetPath: string): Promise<void> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
} catch (error) {
tl.debug("Unable to get packaging URIs");
tl.debug("Unable to get packaging URIs, using default collection URI");
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable("System.TeamFoundationCollectionUri");
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl};
}

const buildIdentityDisplayName: string = null;
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NuGetCommandV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": {
"Major": 2,
"Minor": 147,
"Patch": 3
"Patch": 4
},
"runsOn": [
"Agent",
Expand Down
7 changes: 5 additions & 2 deletions Tasks/NuGetInstallerV0/nugetinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ async function main(): Promise<void> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
} catch (error) {
tl.debug("Unable to get packaging URIs");
tl.debug("Unable to get packaging URIs, using default collection URI");
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable("System.TeamFoundationCollectionUri");
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl};
}

let buildIdentityDisplayName: string = null;
Expand Down
7 changes: 5 additions & 2 deletions Tasks/NuGetPublisherV0/nugetpublisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ async function main(): Promise<void> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
} catch (error) {
tl.debug("Unable to get packaging URIs");
tl.debug("Unable to get packaging URIs, using default collection URI");
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable("System.TeamFoundationCollectionUri");
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl};
}

let buildIdentityDisplayName: string = null;
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NuGetPublisherV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": {
"Major": 0,
"Minor": 147,
"Patch": 0
"Patch": 1
},
"runsOn": [
"Agent",
Expand Down
7 changes: 5 additions & 2 deletions Tasks/NuGetRestoreV1/nugetinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ async function main(): Promise<void> {
tl.debug("getting the uris");
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
} catch (error) {
tl.debug("Unable to get packaging URIs");
tl.debug("Unable to get packaging URIs, using default collection URI");
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable("System.TeamFoundationCollectionUri");
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl};
}
tl.debug("got the uris");
let buildIdentityDisplayName: string = null;
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NuGetRestoreV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": {
"Major": 1,
"Minor": 147,
"Patch": 0
"Patch": 1
},
"runsOn": [
"Agent",
Expand Down
7 changes: 5 additions & 2 deletions Tasks/NuGetV0/nuget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ async function main(): Promise<void> {
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
} catch (error) {
tl.debug("Unable to get packaging URIs");
tl.debug("Unable to get packaging URIs, using default collection URI");
tl.debug(JSON.stringify(error));
throw new Error(error);
const collectionUrl = tl.getVariable("System.TeamFoundationCollectionUri");
packagingLocation = {
PackagingUris: [collectionUrl],
DefaultPackagingUri: collectionUrl};
}

tl.setResourcePath(path.join(__dirname, "task.json"));
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NuGetV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"version": {
"Major": 0,
"Minor": 147,
"Patch": 0
"Patch": 1
},
"runsOn": [
"Agent",
Expand Down

0 comments on commit 47de988

Please sign in to comment.