src/versions.js
async function getVersions () {
  let versions = process.versions
  let prettyVersions = []
  versions.os = process.platform + ' ' + process.arch

  for (let variable in versions) {
    if (versions.hasOwnProperty(variable)) {
      prettyVersions.push(`${variable}: ${versions[variable]}`)
    }
  }

  try {
    const windowsVersion = await _getWindowsVersion()
    prettyVersions.push(windowsVersion.replace(/  +/g, ' '))
  } catch (error) {
    // Do nothing, we're okay with this failing.
    // Most common reason is we're not on an english
    // Windows.
  }

  return prettyVersions.join(' | ')
}
async function getVersions () {
  let versions = process.versions
  let prettyVersions = []
  versions.os = process.platform + ' ' + process.arch

  for (let variable in versions) {
    if (versions.hasOwnProperty(variable)) {
      prettyVersions.push(`${variable}: ${versions[variable]}`)
    }
  }

  try {
    const windowsVersion = await _getWindowsVersion()
    prettyVersions.push(windowsVersion.replace(/  +/g, ' '))
  } catch (error) {
    // Do nothing, we're okay with this failing.
    // Most common reason is we're not on an english
    // Windows.
  }

  return prettyVersions.join(' | ')
}
async function getVersions ( ) { let versions = process . versions let prettyVersions = [ ] versions . os = process . platform + ' ' + process . arch for ( let variable in versions ) { if ( versions . hasOwnProperty ( variable ) ) { prettyVersions . push ( ` ${ variable } ${ versions [ variable ] } ` ) } } try { const windowsVersion = await _getWindowsVersion ( ) prettyVersions . push ( windowsVersion . replace ( /   + / g , ' ' ) ) } catch ( error ) { // Do nothing, we're okay with this failing. // Most common reason is we're not on an english // Windows. } return prettyVersions . join ( ' | ' ) }
Get installed versions of virtually everything important
Get installed versions of virtually everything important