/* * Helper to parse a command into useful metadataz */ const parseCmd = meta => _.merge({}, meta, { bin: _.trimEnd(path.basename(_.first(meta._), '"')), cmd: meta._[1], args: _.drop(meta._, 2), })
/* * Helper to map the cwd on the host to the one in the container */ const getContainerPath = appRoot => { // Break up our app root and cwd so we can get a diff const cwd = process.cwd().split(path.sep); const dir = _.drop(cwd, appRoot.split(path.sep).length); // Add our in-container app root // this will always be /app dir.unshift('/app'); // Return the directory return dir.join('/'); }
return _.drop(output, 2).join(' ');
input = _.drop(input.split('.')).join('.');