@softvisio/cli
Version:
Softisio CLI Tool
26 lines (18 loc) • 561 B
JavaScript
import openUrl from "#core/open-url";
import Command from "#lib/command";
export default class extends Command {
// static
static cli () {
return {};
}
// public
async run () {
const pkg = this._findGitRoot();
if ( !pkg ) return result( [ 500, "Unable to find git root" ] );
const git = pkg.git,
upstream = git.upstream;
if ( !upstream ) return result( [ 500, "Upstream git repository wasn't found" ] );
const wikiUrl = upstream.wikiUrl;
openUrl( wikiUrl );
}
}