How to use the args.docker function in args

To help you get started, we’ve selected a few args examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github matthewmueller / coderunner / lib / run / index.js View on Github external
var spawn = require('child_process').spawn;
var exec = require('child_process').exec;
var ms = require('ms');
var args = require('args');

/**
 * Path to cid files
 */

var cids = join(__dirname, '/../../cids');

/**
 * No docker
 */

var docker = (false === args.docker) ? false : true;

/**
 * Export `Run`
 */

module.exports = Run;

/**
 * Initialize `Run`
 */

function Run(obj, io) {
  if (!(this instanceof Run)) return new Run(obj, this);
  this.io = io;
  var self = this;
  var pending = 2;
github matthewmueller / coderunner / lib / install / index.js View on Github external
/**
 * Module dependencies
 */

var debug = require('debug')('coderunner:install');
var exec = require('child_process').exec;
var request = require('superagent');
var conf = require('conf');
var project = conf.project;
var args = require('args');

/**
 * Use docker?
 */

var docker = (false === args.docker) ? false : true;

/**
 * Export `Install`
 */

exports = module.exports = Install;

/**
 * Initialize `Install`
 */

function Install(dep, io) {
  if (!(this instanceof Install)) return new Install(dep, this);
  this.io = io;
  var action = (docker) ? 'install' : 'local';
  this[action](dep);