Added startup arg to prevent reboot
This commit is contained in:
7
dist/Reboot.js
vendored
7
dist/Reboot.js
vendored
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
||||
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
}
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.reboot = reboot;
|
||||
exports.reboot = void 0;
|
||||
var child_process_1 = require("child_process");
|
||||
function reboot() {
|
||||
if (process.platform === 'win32') {
|
||||
@@ -50,6 +50,7 @@ function reboot() {
|
||||
message: 'Platform not supported',
|
||||
});
|
||||
}
|
||||
exports.reboot = reboot;
|
||||
function rebootWindows() {
|
||||
return new Promise(function (resolve, reject) {
|
||||
(0, child_process_1.exec)('shutdown /r /t 3', function (error, stdout, stderr) {
|
||||
|
||||
Reference in New Issue
Block a user