From 2a377fe64379c65b2af000f9a929ff6893705e27 Mon Sep 17 00:00:00 2001 From: Victor Savkin Date: Sat, 7 Apr 2018 07:45:37 -0400 Subject: [PATCH] fix(schematics): ignore errors when the tools directory already exists --- .../schematics/migrations/20180405-add-tools-directory.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/schematics/migrations/20180405-add-tools-directory.ts b/packages/schematics/migrations/20180405-add-tools-directory.ts index cdd23a10c0822..ca02322cf2803 100644 --- a/packages/schematics/migrations/20180405-add-tools-directory.ts +++ b/packages/schematics/migrations/20180405-add-tools-directory.ts @@ -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'), ''); } };