Skip to content

Commit

Permalink
(maint) Fixing tslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Nov 24, 2018
1 parent e46b818 commit 446fd66
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/ChocolateyCliManager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { window, QuickPickItem, workspace } from "vscode";
import { ChocolateyOperation } from "./ChocolateyOperation";
import * as path from 'path';
import * as path from "path";

export class ChocolateyCliManager {
public new(): void {
Expand All @@ -19,7 +19,7 @@ export class ChocolateyCliManager {
public pack(): void {
workspace.findFiles("**/*.nuspec").then((nuspecFiles) => {
if(nuspecFiles.length ===0) {
window.showErrorMessage("There are no nuspec files in the current workspace.")
window.showErrorMessage("There are no nuspec files in the current workspace.");
return;
}

Expand All @@ -35,7 +35,7 @@ export class ChocolateyCliManager {
}

window.showQuickPick(quickPickItems, {
placeHolder: 'Available nuspec files...'
placeHolder: "Available nuspec files..."
}).then((nuspecSelection) => {
if(!nuspecSelection) {
return;
Expand All @@ -55,6 +55,7 @@ export class ChocolateyCliManager {
}

let cwd: string = quickPickItem.description ? quickPickItem.description : "";
// tslint:disable-next-line:max-line-length
let packOp: ChocolateyOperation = new ChocolateyOperation(["pack", quickPickItem.label, additionalArguments], { isOutputChannelVisible: true, currentWorkingDirectory: cwd });
packOp.run();
});
Expand All @@ -64,10 +65,11 @@ export class ChocolateyCliManager {
}

let cwd: string = nuspecSelection.description ? nuspecSelection.description : "";
// tslint:disable-next-line:max-line-length
let packOp: ChocolateyOperation = new ChocolateyOperation(["pack", nuspecSelection.label, additionalArguments], { isOutputChannelVisible: true, currentWorkingDirectory: cwd });
packOp.run();
}
})
});
});
});
}
Expand Down
1 change: 1 addition & 0 deletions src/ChocolateyOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export class ChocolateyOperation {
});
}

// tslint:disable-next-line:max-line-length
constructor (cmd: string | Array<string>, options: { isOutputChannelVisible: boolean; currentWorkingDirectory: string } = { isOutputChannelVisible: true, currentWorkingDirectory: getFullAppPath() }) {
this._isOutputChannelVisible = options.isOutputChannelVisible;
this.cmd = (Array.isArray(cmd)) ? cmd : [cmd];
Expand Down
4 changes: 2 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var installed : boolean = false;
export function activate(): void {
// register Commands
commands.registerCommand("chocolatey.new", () => execute("new"));
commands.registerCommand("chocolatey.pack", () => execute("pack"))
commands.registerCommand("chocolatey.pack", () => execute("pack"));
}

function execute(cmd?: string | undefined, arg?: any[] | undefined): Thenable<string | undefined> | undefined {
Expand All @@ -29,7 +29,7 @@ function execute(cmd?: string | undefined, arg?: any[] | undefined): Thenable<st
return window.showErrorMessage("Chocolatey is not installed");
}

// Check if there is an open folder in workspace
// check if there is an open folder in workspace
if (workspace.rootPath === undefined) {
return window.showErrorMessage("You have not yet opened a folder.");
}
Expand Down

0 comments on commit 446fd66

Please sign in to comment.