MCPcopy Create free account
hub / github.com/Create-Node-App/create-node-app / solveGitPath

Function solveGitPath

src/paths.js:5–16  ·  view source on GitHub ↗
(addon)

Source from the content-addressed store, hash-verified

3const gitCache = require('./git-tools');
4
5async function solveGitPath(addon) {
6 const [gitPath, type] = addon.split('#type=');
7 const [url, branch] = gitPath.split('@');
8 const id = new Buffer(gitPath).toString('base64');
9 const target = path.join(os.homedir(), '.crwp', 'crwp', id);
10 try {
11 await gitCache({ git: url, branch, target });
12 } catch (err) {
13 console.log(err);
14 }
15 return { dir: target, type };
16}
17
18async function getAddonPackagePath({ addon, git }) {
19 if (git) {

Callers 2

getAddonPackagePathFunction · 0.85
getAddonTemplateDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected