Skip to content

Commit

Permalink
refactor: feedback code suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
djelinek committed Nov 4, 2024
1 parent 24838a2 commit 729378c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/extester/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ program
.action(
withErrors(async (id, ids, cmd) => {
const extest = new ExTester(cmd.storage, codeStream(cmd.type), cmd.extensions_dir);
await extest.installFromMarketplace(id, cmd.pre_release);
await extest.installFromMarketplace(id, cmd.pre_release);
if (ids && ids.length > 0) {
for (const idx of ids) {
await extest.installFromMarketplace(idx);
await extest.installFromMarketplace(idx, cmd.pre_release);
}
}
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/extester/src/extester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class ExTester {
* Install an extension from VS Code marketplace into the test instance
* @param id id of the extension to install
*/
async installFromMarketplace(id: string, preRelease = false): Promise<void> {
async installFromMarketplace(id: string, preRelease?: boolean): Promise<void> {
return this.code.installExtension(undefined, id, preRelease);
}

Expand Down
8 changes: 4 additions & 4 deletions packages/extester/src/util/codeUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class CodeUtil {
/**
* Install your extension into the test instance of VS Code
*/
installExtension(vsix?: string, id?: string, preRelease = false): void {
installExtension(vsix?: string, id?: string, preRelease?: boolean): void {
const pjson = require(path.resolve('package.json'));
if (id) {
return this.installExt(id, preRelease);
Expand Down Expand Up @@ -186,10 +186,10 @@ export class CodeUtil {
}
}

private installExt(pathOrID: string, preRelease = false): void {
private installExt(pathOrID: string, preRelease?: boolean): void {
let command = `${this.getCliInitCommand()} --force --install-extension "${pathOrID}"`;
if(preRelease){
command += " --pre-release";
if (preRelease) {
command += ' --pre-release';
}
if (this.extensionsFolder) {
command += ` --extensions-dir=${this.extensionsFolder}`;
Expand Down

0 comments on commit 729378c

Please sign in to comment.