MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / clone

Method clone

tests/helpers/package-cache.js:650–660  ·  view source on GitHub ↗

* The `clone` method duplicates a cache. Some package managers can * leverage a pre-existing state to speed up their installation. * * @method destroy * @param {String} fromLabel The label for the cache to clone. * @param {String} toLabel The label for the new cache.

(fromLabel, toLabel)

Source from the content-addressed store, hash-verified

648 * @param {String} toLabel The label for the new cache.
649 */
650 clone(fromLabel, toLabel) {
651 process.chdir(this.rootPath);
652 let outputDir = quickTemp.makeOrReuse(this.dirs, toLabel);
653 process.chdir(originalWorkingDirectory);
654
655 this._conf.set(toLabel, outputDir);
656
657 fs.copySync(this.get(fromLabel), outputDir);
658
659 return this.dirs[toLabel];
660 }
661};

Callers 1

Calls 1

getMethod · 0.95

Tested by

no test coverage detected