mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-23 04:11:06 +07:00
17 lines
356 B
JavaScript
17 lines
356 B
JavaScript
|
#!/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);
|
||
|
}
|