maestro/app/classes/state/git/AbstractGitState.js

15 lines
357 B
JavaScript

const State = require('../State')
const Repository = require('../../git/Repository')
class AbstractGitState extends State {
async _repo() {
const path = await this._host.get_path(this._config.path)
if ( !path.is_valid() ) await path.touch(true)
return new Repository(path)
}
}
module.exports = exports = AbstractGitState