🔧 Disable standard/no-callback-literal where necessary
This commit is contained in:
parent
f81bfb7b86
commit
f7d6e3fa7b
6 changed files with 21 additions and 0 deletions
|
@ -28,6 +28,8 @@ var spawnUpdate = function (args, detached, callback) {
|
|||
// Process spawned, different args: Return with error
|
||||
// No process spawned: Spawn new process
|
||||
if (spawnedProcess && !isSameArgs(args)) {
|
||||
// Disabled for backwards compatibility:
|
||||
// eslint-disable-next-line standard/no-callback-literal
|
||||
return callback(`AutoUpdater process with arguments ${args} is already running`)
|
||||
} else if (!spawnedProcess) {
|
||||
spawnedProcess = spawn(updateExe, args, {
|
||||
|
@ -68,6 +70,8 @@ var spawnUpdate = function (args, detached, callback) {
|
|||
|
||||
// Process terminated with error.
|
||||
if (code !== 0) {
|
||||
// Disabled for backwards compatibility:
|
||||
// eslint-disable-next-line standard/no-callback-literal
|
||||
return callback(`Command failed: ${signal != null ? signal : code}\n${stderr}`)
|
||||
}
|
||||
|
||||
|
@ -93,6 +97,8 @@ exports.checkForUpdate = function (updateURL, callback) {
|
|||
json = stdout.trim().split('\n').pop()
|
||||
update = (ref = JSON.parse(json)) != null ? (ref1 = ref.releasesToApply) != null ? typeof ref1.pop === 'function' ? ref1.pop() : void 0 : void 0 : void 0
|
||||
} catch (jsonError) {
|
||||
// Disabled for backwards compatibility:
|
||||
// eslint-disable-next-line standard/no-callback-literal
|
||||
return callback(`Invalid result:\n${stdout}`)
|
||||
}
|
||||
return callback(null, update)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue