From 3d36e5f5d33a97004bac016a151290b52a3bdbb0 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Thu, 13 Aug 2015 11:45:50 -0400 Subject: [PATCH] Remove outdated Windows elevation mechanism This functionality is outdated and not using anymore due to limitations in the way it was addressed. The module and dependencies are removed for now, and will be added back in the future, once a better approach is planned. --- build/elevate.js | 25 ------------------------- lib/elevate.coffee | 16 ---------------- package.json | 3 --- 3 files changed, 44 deletions(-) delete mode 100644 build/elevate.js delete mode 100644 lib/elevate.coffee diff --git a/build/elevate.js b/build/elevate.js deleted file mode 100644 index ed341072..00000000 --- a/build/elevate.js +++ /dev/null @@ -1,25 +0,0 @@ -(function() { - var _, isWindows, os, path; - - _ = require('lodash'); - - os = require('os'); - - path = require('path'); - - isWindows = function() { - return os.platform() === 'win32'; - }; - - exports.shouldElevate = function(error) { - return _.all([isWindows(), error.code === 'EPERM' || error.code === 'EACCES']); - }; - - exports.run = function(command) { - if (!isWindows()) { - return; - } - return require('windosu').exec(command); - }; - -}).call(this); diff --git a/lib/elevate.coffee b/lib/elevate.coffee deleted file mode 100644 index 087bef27..00000000 --- a/lib/elevate.coffee +++ /dev/null @@ -1,16 +0,0 @@ -_ = require('lodash') -os = require('os') -path = require('path') - -isWindows = -> - return os.platform() is 'win32' - -exports.shouldElevate = (error) -> - return _.all [ - isWindows() - error.code is 'EPERM' or error.code is 'EACCES' - ] - -exports.run = (command) -> - return if not isWindows() - require('windosu').exec(command) diff --git a/package.json b/package.json index ff7e7515..a50209d3 100644 --- a/package.json +++ b/package.json @@ -23,9 +23,6 @@ ], "author": "Juan Cruz Viotti ", "license": "MIT", - "optionalDependencies": { - "windosu": "^0.1.3" - }, "devDependencies": { "chai": "^3.0.0", "ent": "^2.2.0",