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

Method canDeleteOutputPath

lib/models/builder.js:83–92  ·  view source on GitHub ↗

Determine whether the output path is safe to delete. If the outputPath appears anywhere in the parents of the project root, the build would delete the project directory. In this case return `false`, otherwise return `true`. @private @method canDeleteOutputPath @param {String

(outputPath)

Source from the content-addressed store, hash-verified

81 @return {Boolean}
82 */
83 canDeleteOutputPath(outputPath) {
84 let rootPathParents = [this.project.root];
85 let dir = path.dirname(this.project.root);
86 rootPathParents.push(dir);
87 while (dir !== path.dirname(dir)) {
88 dir = path.dirname(dir);
89 rootPathParents.push(dir);
90 }
91 return rootPathParents.indexOf(outputPath) === -1;
92 }
93
94 /**
95 * @private

Callers 2

copyToOutputPathMethod · 0.95
builder-test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected