Skip to content

Commit

Permalink
Commands only return promises.
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-r-rose committed Jun 26, 2018
1 parent d741040 commit 8889d59
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/launcher/src/index.tsx
Expand Up @@ -366,14 +366,13 @@ function Card(kernel: boolean, item: ILauncher.IItemOptions, launcher: Launcher,
return;
}
launcher.pending = true;
let value = commands.execute(command, {
commands.execute(command, {
...item.args,
cwd: launcher.cwd
});
Promise.resolve(value).then(widget => {
}).then(value => {
launcher.pending = false;
if (widget instanceof Widget) {
launcherCallback(widget);
if (value instanceof Widget) {
launcherCallback(value);
launcher.dispose();
}
}).catch(err => {
Expand Down

0 comments on commit 8889d59

Please sign in to comment.