mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 13:47:54 +00:00
Apply coffeelint everywhere
This commit is contained in:
parent
c52c2c0bd9
commit
1eb31ce5f6
@ -205,7 +205,7 @@ exports.start = start = (app) ->
|
||||
ports[port + '/tcp'] = [ HostPort: port ]
|
||||
container.startAsync(
|
||||
Privileged: true
|
||||
NetworkMode: "host"
|
||||
NetworkMode: 'host'
|
||||
PortBindings: ports
|
||||
Binds: [
|
||||
'/resin-data/' + app.appId + ':/data'
|
||||
@ -257,15 +257,15 @@ exports.lockAndKill = lockAndKill = (app, force) ->
|
||||
.catch (err) ->
|
||||
if err.code != 'ENOENT'
|
||||
locked[app.appId] = false
|
||||
message = 'Updates are locked by application'
|
||||
logSystemEvent(logTypes.stopAppError, app, { message })
|
||||
throw message
|
||||
err = new Error('Updates are locked by application')
|
||||
logSystemEvent(logTypes.stopAppError, app, err)
|
||||
throw err
|
||||
.then ->
|
||||
kill(app)
|
||||
|
||||
exports.startAndUnlock = startAndUnlock = (app) ->
|
||||
Promise.try ->
|
||||
throw "Cannot start app because we couldn't acquire lock" if locked[app.appId] == false
|
||||
throw new Error("Cannot start app because we couldn't acquire lock") if locked[app.appId] == false
|
||||
.then ->
|
||||
locked[app.appId] = null
|
||||
start(app)
|
||||
|
@ -180,9 +180,9 @@ do ->
|
||||
getRegistryAndName = (image) ->
|
||||
[ m, registry, imageName ] = image.match(/(.+[:.].+)\/(.+\/.+)/)
|
||||
if not registry
|
||||
throw new Error("Expected image name to include registry domain name")
|
||||
throw new Error('Expected image name to include registry domain name')
|
||||
if not imageName
|
||||
throw new Error("Invalid image name, expected domain.tld/repo/image format.")
|
||||
throw new Error('Invalid image name, expected domain.tld/repo/image format.')
|
||||
return {registry, imageName}
|
||||
|
||||
# Create a stream that transforms `docker.modem.followProgress` onProgress events
|
||||
|
Loading…
Reference in New Issue
Block a user