MCPcopy Create free account
hub / github.com/acode/cli / writeCredentials

Function writeCredentials

cli/credentials.js:63–74  ·  view source on GitHub ↗
(obj, pathname)

Source from the content-addressed store, hash-verified

61}
62
63function writeCredentials(obj, pathname) {
64
65 let stdlibPath = pathname ? path.join(pathname, FILENAME) : findPath();
66
67 if (!stdlibPath) {
68 throw new Error(`Please initialize stdlib in directory tree`);
69 }
70
71 let str = Object.keys(obj).map(k => `${k}=${obj[k]}`).join('\n') + '\n';
72 fs.writeFileSync(stdlibPath, str);
73
74}
75
76module.exports = {
77

Callers 1

credentials.jsFile · 0.85

Calls 1

findPathFunction · 0.85

Tested by

no test coverage detected