Skip to content

Commit 36c2531

Browse files
committed
fix: theme builder error when the output directory doesn't exist
1 parent b1373b9 commit 36c2531

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/smui-theme/bin/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ yargs(hideBin(process.argv))
3636
});
3737
},
3838
(argv) => {
39+
if (!fs.existsSync(path.dirname(argv.output))) {
40+
console.error(
41+
"It looks like the output directory doesn't exist.\n",
42+
path.dirname(argv.output),
43+
'\nDid you mean to output the file into another directory?'
44+
);
45+
process.exit(1);
46+
}
47+
3948
console.log('Compiling SMUI Styles...');
4049

4150
const result = sass.renderSync({

0 commit comments

Comments
 (0)