ext.js 433 B

1234567891011121314151617181920
  1. const cmdExists = require('command-exists')
  2. module.exports = {
  3. key: 'git',
  4. title: 'Git',
  5. description: 'Distributed version control system. Required for the Git storage module.',
  6. isInstalled: false,
  7. async isCompatible () {
  8. return true
  9. },
  10. async check () {
  11. try {
  12. await cmdExists('git')
  13. this.isInstalled = true
  14. } catch (err) {
  15. this.isInstalled = false
  16. }
  17. return this.isInstalled
  18. }
  19. }