mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
Fix.
This commit is contained in:
parent
596a6da241
commit
c1a589c5b6
7078 changed files with 1882834 additions and 319 deletions
26
node_modules/read-pkg-up/index.js
generated
vendored
Normal file
26
node_modules/read-pkg-up/index.js
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
'use strict';
|
||||
const findUp = require('find-up');
|
||||
const readPkg = require('read-pkg');
|
||||
|
||||
module.exports = options => {
|
||||
return findUp('package.json', options).then(fp => {
|
||||
if (!fp) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return readPkg(fp, options).then(pkg => ({pkg, path: fp}));
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.sync = options => {
|
||||
const fp = findUp.sync('package.json', options);
|
||||
|
||||
if (!fp) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return {
|
||||
pkg: readPkg.sync(fp, options),
|
||||
path: fp
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue