Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openfin-launcher

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openfin-launcher - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

5

package.json
{
"name": "openfin-launcher",
"version": "1.4.1",
"version": "1.4.2",
"description": "OpenFin launcher",

@@ -36,5 +36,2 @@ "author": "Ricardo de Pena <ricardo.depena@gmail.com>",

},
"optionalDependencies": {
"windows": "0.0.6"
},
"scripts": {

@@ -41,0 +38,0 @@ "test": "grunt"

24

src/expand-options.js

@@ -5,3 +5,2 @@ var os = require('os');

var xpLocation = '\\Local Settings\\Application Data\\OpenFin';

@@ -12,8 +11,2 @@ var winEightOrGreater = '\\AppData\\Local\\OpenFin';

// Resolves out environment paths (%localappdata%)
function resolveToAbsolutePath(path) {
return path.replace(/%([^%]+)%/g, function(_, key) {
return process.env[key];
});
}

@@ -26,20 +19,4 @@ function expand(options) {

if (isWindows) {
var windows = require('windows'); //This is Windows specific module and will NOT work on other OS flavors.
var isXP = isWindows && (+os.release().split('.')[0]) < 6;
var defaultAppData = path.join(process.env['USERPROFILE'], isXP ? xpLocation : winEightOrGreater);
try {
var openFinRvmRegistry = windows.registry('HKCU/Software/OpenFin/RVM/Settings/Deployment');
// if a custom rvmInstallDirectory registry key is set, use its value instead of default location
if (openFinRvmRegistry.rvmInstallDirectory !== undefined) {
defaultAppData = path.normalize(resolveToAbsolutePath(openFinRvmRegistry.rvmInstallDirectory.value.toString()));
console.log("rvmInstallDirectory found. Using RVM Location: ", defaultAppData);
}
} catch (err) {
console.log('deployment group policy not found, launching from:', defaultAppData);
}
defaultOptions.rvmPath = path.resolve(defaultAppData, 'OpenFinRVM.exe');

@@ -53,4 +30,5 @@ }

return _.defaults(_.clone(options), defaultOptions);
}
module.exports = expand;

@@ -57,3 +57,3 @@ var spawn = require('child_process').spawn;

of.stdout.on('data', function(data) {
of .stdout.on('data', function(data) {
var sData = '' + data;

@@ -68,8 +68,7 @@

}
});
of.stderr.on('data', function(data) {
}); of .stderr.on('data', function(data) {
console.log('' + data);
});
of.on('exit', function(code) {
of .on('exit', function(code) {
console.log(code);

@@ -76,0 +75,0 @@ deffered.resolve(code);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc