Skip to content

Commit

Permalink
fix(schematics): ignore errors when the tools directory already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Apr 7, 2018
1 parent fba3b24 commit 2a377fe
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import * as path from 'path';
export default {
description: 'Add tools directory',
run: () => {
mkdirSync('tools');
mkdirSync(path.join('tools', 'schematics'));
try {
mkdirSync('tools');
} catch (e) {}
try {
mkdirSync(path.join('tools', 'schematics'));
} catch (e) {}
writeFileSync(path.join('tools', 'schematics', '.gitkeep'), '');
}
};

0 comments on commit 2a377fe

Please sign in to comment.