mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 21:14:45 +00:00
.
This commit is contained in:
parent
a004f0ae58
commit
fc725ba36b
7280 changed files with 19 additions and 1796407 deletions
22
node_modules/cosmiconfig/dist/getDirectory.js
generated
vendored
22
node_modules/cosmiconfig/dist/getDirectory.js
generated
vendored
|
@ -1,22 +0,0 @@
|
|||
//
|
||||
'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