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 ] ports[port + '/tcp'] = [ HostPort: port ]
container.startAsync( container.startAsync(
Privileged: true Privileged: true
NetworkMode: "host" NetworkMode: 'host'
PortBindings: ports PortBindings: ports
Binds: [ Binds: [
'/resin-data/' + app.appId + ':/data' '/resin-data/' + app.appId + ':/data'
@ -257,15 +257,15 @@ exports.lockAndKill = lockAndKill = (app, force) ->
.catch (err) -> .catch (err) ->
if err.code != 'ENOENT' if err.code != 'ENOENT'
locked[app.appId] = false locked[app.appId] = false
message = 'Updates are locked by application' err = new Error('Updates are locked by application')
logSystemEvent(logTypes.stopAppError, app, { message }) logSystemEvent(logTypes.stopAppError, app, err)
throw message throw err
.then -> .then ->
kill(app) kill(app)
exports.startAndUnlock = startAndUnlock = (app) -> exports.startAndUnlock = startAndUnlock = (app) ->
Promise.try -> 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 -> .then ->
locked[app.appId] = null locked[app.appId] = null
start(app) start(app)

View File

@ -180,9 +180,9 @@ do ->
getRegistryAndName = (image) -> getRegistryAndName = (image) ->
[ m, registry, imageName ] = image.match(/(.+[:.].+)\/(.+\/.+)/) [ m, registry, imageName ] = image.match(/(.+[:.].+)\/(.+\/.+)/)
if not registry 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 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} return {registry, imageName}
# Create a stream that transforms `docker.modem.followProgress` onProgress events # Create a stream that transforms `docker.modem.followProgress` onProgress events