Skip to content

Instantly share code, notes, and snippets.

@hamzamu
Last active January 1, 2020 02:09
Show Gist options
  • Save hamzamu/6661dcf4fd3b51d8d5ebbce4deb098fa to your computer and use it in GitHub Desktop.
Save hamzamu/6661dcf4fd3b51d8d5ebbce4deb098fa to your computer and use it in GitHub Desktop.
Meteor Promise: Await
// https://blog.meteor.com/using-promises-and-async-await-in-meteor-8f6f4a04f998
import { Promise } from 'meteor/promise';
async function run(command) {
log('Running: ', command);
return execSync(command).toString().trim();
}
const rows = Promise.await(run(command));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment