MCPcopy Index your code
hub / github.com/darkreader/darkreader / getVersion

Function getVersion

tasks/cli.js:66–77  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

64}
65
66function getVersion(args) {
67 const prefix = '--version=';
68 const arg = args.find((arg) => arg.startsWith(prefix));
69 if (!arg) {
70 return null;
71 }
72 const version = arg.substring(prefix.length);
73 if (/^\d+(.\d+){0,3}$/.test(version)) {
74 return version;
75 }
76 throw new Error(`Invalid version argument ${version}`);
77}
78
79async function ensureGitClean() {
80 const diff = await execute('git diff');

Callers 1

runFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected