How to use the macos-release.version function in macos-release

To help you get started, we’ve selected a few macos-release examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github quentinrossetti / node-7z / util / path.js View on Github external
module.exports = function (options) {
    
  // Create a string that can be parsed by `run`.
  try {    
      
    if (options.path) return options.path;     
    
  } catch (e) {
    var path = require('path');
    var macversion = (process.platform == "darwin") ? require('macos-release').version : '';
    var binarypath = path.resolve(__dirname, '..','binaries', (macversion=='') ? process.platform : process.platform, macversion);
    return path.join(binarypath, process.platform === "win32" ? '7za.exe' : '7za');
  }
  
};

macos-release

Get the name and version of a macOS release from the Darwin version

MIT
Latest version published 4 months ago

Package Health Score

79 / 100
Full package analysis

Popular macos-release functions