mirror of
https://github.com/RamonGebben/mergify.git
synced 2026-03-10 08:51:18 +00:00
19 lines
402 B
JavaScript
19 lines
402 B
JavaScript
const { access, constants } = require('fs');
|
|
const { promisify } = require('util');
|
|
const accessAsync = promisify(access);
|
|
const { getConfigPath } = require('../getConfigPath');
|
|
|
|
async function checkConfigExists() {
|
|
try {
|
|
await accessAsync(getConfigPath(), constants.F_OK);
|
|
return true;
|
|
}
|
|
catch(_){
|
|
return false;
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
checkConfigExists
|
|
};
|