install-nix-action/node_modules/loose-envify/cli.js
Domen Kožar 70742d22d9
v6
2019-11-19 17:50:30 +01:00

16 lines
356 B
JavaScript
Executable file

#!/usr/bin/env node
'use strict';
var looseEnvify = require('./');
var fs = require('fs');
if (process.argv[2]) {
fs.createReadStream(process.argv[2], {encoding: 'utf8'})
.pipe(looseEnvify(process.argv[2]))
.pipe(process.stdout);
} else {
process.stdin.resume()
process.stdin
.pipe(looseEnvify(__filename))
.pipe(process.stdout);
}