Apply coffeelint everywhere

This commit is contained in:
Pablo Carranza Vélez 2015-08-17 21:21:27 +00:00
parent c52c2c0bd9
commit 1eb31ce5f6
2 changed files with 10 additions and 10 deletions

View File

@ -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)

View File

@ -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