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: v9.11.1 (via NVM)
Yarn: 1.7.0
NPM: 5.6.0
Windows 10 Pro (v1803 build 17134.112)
Repro steps
Given the following schematic:
export default function (_options: any): Rule {
// The chain rule allows us to chain multiple rules and apply them one after the other.
return chain([
(tree: Tree) => {
tree.create('test', 'test');
tree.delete('test');
},
]);
}
The log given by the failure
Path "/test" does not exist.
Desired functionality
The file should be deleted without an error.
Mention any other details that might be useful
This is a minimal reproduction of a problem I encountered, in my custom schematic I try to delete files generated earlier by another (external) schematic or a template call (from another collection, but same collection).
However whenever I call delete, the schematic aborts and reports that the file I try to delete does not exist.
Strangely enough, calls to "rename", "exist" etc on the same file work as expected.
Bug Report or Feature Request (mark with an
x)Area
Versions
Node: v9.11.1 (via NVM)
Yarn: 1.7.0
NPM: 5.6.0
Windows 10 Pro (v1803 build 17134.112)
Repro steps
Given the following schematic:
The log given by the failure
Path "/test" does not exist.Desired functionality
The file should be deleted without an error.
Mention any other details that might be useful
This is a minimal reproduction of a problem I encountered, in my custom schematic I try to delete files generated earlier by another (external) schematic or a template call (from another collection, but same collection).
However whenever I call delete, the schematic aborts and reports that the file I try to delete does not exist.
Strangely enough, calls to "rename", "exist" etc on the same file work as expected.