-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
area: @angular-devkit/schematicsfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Milestone
Description
Re-post of angular/devkit#745
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Area
- [ ] devkit
- [x] schematics
Versions
Node v8.11.1
NPM 5.8.0
Mac OS High Sierra
Repro steps
Use the following schematic
import { Rule, url, apply, mergeWith, chain, MergeStrategy } from '@angular-devkit/schematics';
export function index(): Rule {
return chain([
simpleMerge(),
]);
}
function simpleMerge(): Rule {
const source = url('./files');
return mergeWith(source, MergeStrategy.Overwrite);
}The log given by the failure
schematics .:boilerplate
ERROR! /src/app/app.component.html already exists.
ERROR! /src/app/app.component.spec.ts already exists.
ERROR! /src/app/app.component.ts already exists.
ERROR! /src/app/app.module.ts already exists.
ERROR! /src/assets/.gitkeep already exists.
ERROR! /src/environments/environment.prod.ts already exists.
ERROR! /src/environments/environment.ts already exists.
ERROR! /src/index.html already exists.
Desired functionality
All files should be overwritten.
Mention any other details that might be useful
I tried every MergeStrategy possible (AllowOverwriteConflict, etc.), same result.
angular/devkit#745
https://stackoverflow.com/questions/48957132/how-to-overwrite-file-with-angular-schematics
Sirius-A, BlueNc, ChristopherL-STCU, martinmcwhorter, cgatian and 18 more
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/schematicsfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix