Skip to content

Commit 52a4b1d

Browse files
committed
pr feedback
1 parent 2fef942 commit 52a4b1d

2 files changed

Lines changed: 9 additions & 27 deletions

File tree

heft-plugins/heft-vscode-extension-plugin/src/VSCodeExtensionPublishPlugin.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,17 @@ export default class VSCodeExtensionPublishPlugin
4242
PUBLISH_UNSIGNED_PARAMETER_NAME
4343
);
4444

45-
if (!vsixPathParameter.value) {
46-
throw new Error(
47-
`The parameter "${VSIX_PATH_PARAMETER_NAME}" is required for the VSCodeExtensionPublishPlugin.`
48-
);
49-
}
5045
const {
5146
logger: { terminal }
5247
} = heftTaskSession;
5348

54-
const vsixPath: string = vsixPathParameter.value;
49+
// required parameters defined in heft-plugin.json
50+
const vsixPath: string = vsixPathParameter.value!;
51+
52+
// manifestPath and signaturePath are required if publishUnsigned is unset
5553
const manifestPath: string | undefined = manifestPathParameter.value;
5654
const signaturePath: string | undefined = signaturePathParameter.value;
57-
const publishUnsigned: boolean = publishUnsignedParameter.value ?? false;
58-
55+
const publishUnsigned: boolean = publishUnsignedParameter.value;
5956
if (publishUnsigned) {
6057
terminal.writeLine(`Publishing unsigned VSIX ${vsixPath}`);
6158
} else {

heft-plugins/heft-vscode-extension-plugin/src/VSCodeExtensionVerifySignaturePlugin.ts

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,10 @@ export default class VSCodeExtensionVerifySignaturePlugin
3737
SIGNATURE_PATH_PARAMETER_NAME
3838
);
3939

40-
if (!vsixPathParameter.value) {
41-
throw new Error(
42-
`The parameter "${VSIX_PATH_PARAMETER_NAME}" is required for the VSCodeExtensionVerifySignaturePlugin.`
43-
);
44-
}
45-
if (!manifestPathParameter.value) {
46-
throw new Error(
47-
`The parameter "${MANIFEST_PATH_PARAMETER_NAME}" is required for the VSCodeExtensionVerifySignaturePlugin.`
48-
);
49-
}
50-
if (!signaturePathParameter.value) {
51-
throw new Error(
52-
`The parameter "${SIGNATURE_PATH_PARAMETER_NAME}" is required for the VSCodeExtensionVerifySignaturePlugin.`
53-
);
54-
}
55-
56-
const vsixPath: string = vsixPathParameter.value;
57-
const manifestPath: string = manifestPathParameter.value;
58-
const signaturePath: string = signaturePathParameter.value;
40+
// required parameters defined in heft-plugin.json
41+
const vsixPath: string = vsixPathParameter.value!;
42+
const manifestPath: string = manifestPathParameter.value!;
43+
const signaturePath: string = signaturePathParameter.value!;
5944

6045
heftTaskSession.hooks.run.tapPromise(PLUGIN_NAME, async (runOptions: IHeftTaskRunHookOptions) => {
6146
const { buildFolderPath } = heftConfiguration;

0 commit comments

Comments
 (0)