1
0
Fork 0
mirror of https://github.com/actions/setup-python.git synced 2024-12-23 12:46:13 +00:00
setup-python/node_modules/ajv/scripts/info
Danny McCormick 39c08a0eaa Initial pass
2019-06-26 21:12:00 -04:00

10 lines
289 B
JavaScript

#!/usr/bin/env node
'use strict';
var fs = require('fs');
var name = process.argv[2] || '.';
var property = process.argv[3] || 'version';
if (name != '.') name = 'node_modules/' + name;
var json = JSON.parse(fs.readFileSync(name + '/package.json', 'utf8'));
console.log(json[property]);