Skip to content

Commit 2d85376

Browse files
authored
Moving setresourcedetails into Publish profile container (#47)
* change in validation factory * Update ValidatorFactory.js * fix for runtime os * update error log * updated error log
1 parent 4b6424c commit 2d85376

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/ActionInputValidator/ValidatorFactory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class ValidatorFactory {
2929
return __awaiter(this, void 0, void 0, function* () {
3030
let actionParams = actionparameters_1.ActionParameters.getActionParams();
3131
if (type === BaseWebAppDeploymentProvider_1.DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE) {
32-
yield this.setResourceDetails(actionParams);
3332
if (!!actionParams.images) {
33+
yield this.setResourceDetails(actionParams);
3434
return new PublishProfileContainerWebAppValidator_1.PublishProfileContainerWebAppValidator();
3535
}
3636
else {

lib/Utilities/PublishProfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class PublishProfile {
6262
}
6363
}
6464
catch (error) {
65-
throw Error("Internal Server Error. Please try again\n" + error);
65+
throw Error("Failed to get app runtime OS\n" + JSON.stringify(error));
6666
}
6767
return this._appOS;
6868
});

src/ActionInputValidator/ValidatorFactory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export class ValidatorFactory {
1717
public static async getValidator(type: DEPLOYMENT_PROVIDER_TYPES) : Promise<IValidator> {
1818
let actionParams: ActionParameters = ActionParameters.getActionParams();
1919
if(type === DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE) {
20-
await this.setResourceDetails(actionParams);
2120
if (!!actionParams.images) {
21+
await this.setResourceDetails(actionParams);
2222
return new PublishProfileContainerWebAppValidator();
2323
}
2424
else {

src/Utilities/PublishProfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class PublishProfile {
6565
core.debug(`App Runtime OS: ${this._appOS}`);
6666
}
6767
} catch(error) {
68-
throw Error("Internal Server Error. Please try again\n" + error);
68+
throw Error("Failed to get app runtime OS\n" + JSON.stringify(error));
6969
}
7070
return this._appOS;
7171
}

0 commit comments

Comments
 (0)