fix(schematics): ignore errors when the tools directory already exists
This commit is contained in:
parent
fba3b24958
commit
2a377fe643
@ -4,8 +4,12 @@ import * as path from 'path';
|
|||||||
export default {
|
export default {
|
||||||
description: 'Add tools directory',
|
description: 'Add tools directory',
|
||||||
run: () => {
|
run: () => {
|
||||||
|
try {
|
||||||
mkdirSync('tools');
|
mkdirSync('tools');
|
||||||
|
} catch (e) {}
|
||||||
|
try {
|
||||||
mkdirSync(path.join('tools', 'schematics'));
|
mkdirSync(path.join('tools', 'schematics'));
|
||||||
|
} catch (e) {}
|
||||||
writeFileSync(path.join('tools', 'schematics', '.gitkeep'), '');
|
writeFileSync(path.join('tools', 'schematics', '.gitkeep'), '');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user