Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion lib/create-from-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,17 @@ exports.compileToFSM = (src, opts={}) => new Promise((resolve, reject) => {
// source, in case it does relative requires
// or reads from that relative location
const curdir = process.cwd()
process.chdir(ui.findFile(dir))

try {
process.chdir(ui.findFile(dir))
} catch (err) {
if (dir.indexOf('@demos') >= 0) {
// this is probably ok, if the dir is one of our @demos
console.error(err)
} else {
throw err
}
}

let res
try {
Expand Down