Merge pull request #200 from smartin015/master
Allow absolute paths to files in cli.js command line arguments
This commit is contained in:
commit
347ceb86e1
1 changed files with 4 additions and 1 deletions
|
|
@ -68,7 +68,10 @@ let exports_save = exports,
|
|||
// fake fetch for worker to get wasm, if needed
|
||||
let fetch = function(url, opts = {}) {
|
||||
if (verbose) console.log({fetch: url});
|
||||
let buf = fs.readFileSync(`${dir}/${url}`);
|
||||
if (!url.startsWith('/')) {
|
||||
url = `${dir}/${url}`;
|
||||
}
|
||||
let buf = fs.readFileSync(url);
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(new Promise((resolve, reject) => {
|
||||
if (opts.format === 'string') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue