Merge pull request #140 from resin-io/jviotti/cleanup/elevate

Remove outdated Windows elevation mechanism
This commit is contained in:
Juan Cruz Viotti 2015-08-13 12:23:26 -04:00
commit 4157f21e06
3 changed files with 0 additions and 44 deletions

View File

@ -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);

View File

@ -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)

View File

@ -23,9 +23,6 @@
],
"author": "Juan Cruz Viotti <juanchiviotti@gmail.com>",
"license": "MIT",
"optionalDependencies": {
"windosu": "^0.1.3"
},
"devDependencies": {
"chai": "^3.0.0",
"ent": "^2.2.0",