aboutsummaryrefslogtreecommitdiff
path: root/src/js/mklayout.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/mklayout.js')
-rw-r--r--src/js/mklayout.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/mklayout.js b/src/js/mklayout.js
index cf95091..8e41f41 100644
--- a/src/js/mklayout.js
+++ b/src/js/mklayout.js
@@ -38,8 +38,8 @@ for (let i = 0; i < args.length; i += 2) {
const mapPath = opt('--map') || path.join(root, 'build', 'core', 'map', 'memmap.h');
const outDir = opt('--out') || path.join(root, 'build', 'js');
-if (!fs.existsSync(mapPath)) {
- console.error('mklayout: no memory map at ' + mapPath + '; run `make` first');
+if (!fs.existsSync(mapPath) || !fs.statSync(mapPath).isFile()) {
+ console.error('mklayout: no memory map header at ' + mapPath + '; run `make` first');
process.exit(1);
}
fs.mkdirSync(outDir, { recursive: true });