Example #1
0
function _getPathToFlow(): Promise<string> {
  if (global.atom) {
    return getConfigValueAsync('nuclide-flow.pathToFlow')();
  } else {
    return Promise.resolve('flow');
  }
}
Example #2
0
async function determineFlowVersion(): Promise<string> {
  var flowVersion;
  try {
    var pathToFlow = await getConfigValueAsync('nuclide-flow.pathToFlow')();
    var result = await asyncExecute(pathToFlow, ['--version'], {});
    flowVersion = result.stdout.trim();
  } catch (e) {
    flowVersion = '';
  }
  return flowVersion;
}