projecte_ionic/node_modules/@npmcli/git/lib/is.js
2022-02-09 18:30:03 +01:00

7 lines
271 B
JavaScript
Executable file

// not an airtight indicator, but a good gut-check to even bother trying
const { promisify } = require('util')
const fs = require('fs')
const stat = promisify(fs.stat)
module.exports = ({ cwd = process.cwd() } = {}) =>
stat(cwd + '/.git').then(() => true, () => false)