Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
retrohacker committed Nov 22, 2018
1 parent cfd9572 commit 1ca442c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var async = require('async')
var distros = require('./os.json')
var fs = require('fs')
var os = require('os')
var path = require('path')

/**
* Begin definition of globals.
Expand All @@ -21,7 +20,7 @@ module.exports = function getOs (cb) {
// Linux is a special case.
if (osName === 'linux') return getLinuxDistro(cb)
// Else, node's builtin is acceptable.
return cb(null, {'os': osName})
return cb(null, { 'os': osName })
}

/**
Expand Down Expand Up @@ -121,7 +120,7 @@ function getName (candidate) {
* Loads a custom logic module to populate additional distribution information
*/
function customLogic (os, name, file, cb) {
var logic = './logic/' + name + '.js';
var logic = './logic/' + name + '.js'
try { require(logic)(os, file, cb) } catch (e) { cb(null, os) }
}

Expand Down
6 changes: 3 additions & 3 deletions tests/runTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ distros.forEach(function (v1) {
// Build the docker image using the dockerfile
process.stdout.write('Building version ' + v2 + ' of ' + capitalize(v1) + '... ')
try {
var dockerResult = execSync('docker build -t "getos:' + v1 + v2 + '" .', {stdio: []})
var dockerResult = execSync('docker build -t "getos:' + v1 + v2 + '" .', { stdio: [] })
} catch (e) {
dockerResult = dockerResult || {}
dockerResult.code = e
Expand All @@ -40,7 +40,7 @@ distros.forEach(function (v1) {
process.stdout.write('Running container... ')
// Show output from distribution
try {
var nodeResult = execSync('docker run -d getos:' + v1 + v2, {stdio: []})
var nodeResult = execSync('docker run -d getos:' + v1 + v2, { stdio: [] })
} catch (e) {
nodeResult = nodeResult || {}
nodeResult.code = e
Expand All @@ -50,7 +50,7 @@ distros.forEach(function (v1) {
process.stdout.write('[' + color.red('FAILED!') + ']\n')
} else {
try {
var dockerLog = execSync('sleep 2s && docker logs ' + (nodeResult.stdout || nodeResult.toString()), {stdio: []})
var dockerLog = execSync('sleep 2s && docker logs ' + (nodeResult.stdout || nodeResult.toString()), { stdio: [] })
} catch (e) {
dockerLog = dockerLog || {}
dockerLog.code = e
Expand Down

0 comments on commit 1ca442c

Please sign in to comment.