Skip to content

Commit f0c6100

Browse files
Resolve #10 - Escape issue
1 parent e522fc3 commit f0c6100

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extension.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import fs = require('fs');
66

77
import Yeoman from './yo/yo';
88

9-
const yo = new Yeoman();
10-
119
export function activate(context: ExtensionContext) {
1210
const cwd = workspace.rootPath;
1311

1412
const disposable = commands.registerCommand('yo', () => {
15-
return window.showQuickPick(list())
13+
const yo = new Yeoman();
14+
15+
return window.showQuickPick(list(yo))
1616
.then(generator => {
1717
if (generator !== undefined) {
1818
yo.run(generator.label, cwd);
@@ -23,7 +23,7 @@ export function activate(context: ExtensionContext) {
2323
context.subscriptions.push(disposable);
2424
}
2525

26-
function list(): Promise<QuickPickItem[]> {
26+
function list(yo: Yeoman): Promise<QuickPickItem[]> {
2727
return new Promise(resolve => {
2828
yo.getEnvironment().lookup(() => {
2929
resolve(yo.getGenerators().map(generator => {

0 commit comments

Comments
 (0)