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
22
node_modules/cosmiconfig/dist/getDirectory.js
generated
vendored
Normal file
22
node_modules/cosmiconfig/dist/getDirectory.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
//
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const isDirectory = require('is-directory');
|
||||
|
||||
function getDirectory(filepath ) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return isDirectory(filepath, (err, filepathIsDirectory) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
return resolve(filepathIsDirectory ? filepath : path.dirname(filepath));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
getDirectory.sync = function getDirectorySync(filepath ) {
|
||||
return isDirectory.sync(filepath) ? filepath : path.dirname(filepath);
|
||||
};
|
||||
|
||||
module.exports = getDirectory;
|
Loading…
Add table
Add a link
Reference in a new issue