This repository has been archived on 2020-01-20. You can view files and clone it, but cannot push or open issues or pull requests.
node-spearhead/lib/do_badger.js

36 lines
845 B
JavaScript
Raw Normal View History

/*
2015-09-04 21:12:20 +03:00
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*
* Copyright 2015 Joyent, Inc.
*
* `triton package ...`
*/
var fs = require('fs');
var once = require('once');
var path = require('path');
function do_badger(subcmd, opts, args, callback) {
var callbackOnce = once(callback);
var badger = path.resolve(__dirname, '../etc/badger');
2015-09-01 19:00:45 +03:00
var input = fs.createReadStream(badger);
input.pipe(process.stdout);
input.on('error', function (err) {
callbackOnce(err);
});
input.on('end', function () {
callbackOnce();
});
2015-09-01 19:00:45 +03:00
}
do_badger.options = [];
2015-09-01 19:00:45 +03:00
do_badger.help = 'Badger don\'t care.';
do_badger.hidden = true;
module.exports = do_badger;