mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-21 01:42:26 +00:00
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.
This commit is contained in:
parent
11033683fd
commit
3d36e5f5d3
@ -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);
|
@ -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)
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user