Skip to content

Commit f9af6a9

Browse files
authored
fix: check if dependency graph file exists before trying to remove
1 parent 9416975 commit f9af6a9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/uikit-workshop/build-tools.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ const path = require('path');
33
const fs = require('fs-extra');
44

55
fs.mkdirp('./node_modules/@pattern-lab/');
6-
fs.unlinkSync('./dependencyGraph.json');
6+
// clear any previously generated dependency graph files if present
7+
if (fs.existsSync('./dependencyGraph.json')) {
8+
fs.unlinkSync('./dependencyGraph.json');
9+
}
710
fs.ensureSymlink(__dirname, './node_modules/@pattern-lab/uikit-workshop');
811

912
const configKeysEndingWithASlash = [

0 commit comments

Comments
 (0)