diff options
author | evgeny <me@ch1p.com> | 2017-06-17 02:51:02 +0300 |
---|---|---|
committer | evgeny <me@ch1p.com> | 2017-06-17 02:51:02 +0300 |
commit | 10a4a51a747283c529af5029253968f5f36119ad (patch) | |
tree | e960d72aceb2da8ab4f550657c1b0d6360a04c57 | |
parent | 61e326656ca7f4c62ee43cc330f97886cf6c5645 (diff) |
add escapeShellArg func
-rw-r--r-- | index.js | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1,2 +1,15 @@ 'use strict' -module.exports = require('./build/Release/winutils.node') + +const bin = require('./build/Release/winutils.node') + +module.exports = { + escapeShellArg(arg) { + arg = arg.replace(/["%!]/g, ' ') + return '"' + arg + '"' + }, + + deelevate: bin.deelevate, + elevate: bin.elevate, + getSystem32Path: bin.getSystem32Path, + isUserAdmin: bin.isUserAdmin +} |