ext.mjs 450 B

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