Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use tmp file for stderr - fixes #87 #91

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ var counter = 0;
var folder = process.cwd()
// Create a writeable stream to redirect stderr to file - if it logs to stdout, then pandoc hangs due to improper json.
// errorLog is used in pandoc.toJSONFilter
var errFile = path.join(folder, "mermaid-filter.err");
var errorLog = fs.createWriteStream(errFile);
var tmpObj = tmp.fileSync({ mode: 0644, prefix: 'mermaid-filter-', postfix: '.err' });
var errorLog = fs.createWriteStream(tmpObj.name)

// console.log(folder)
function mermaid(type, value, format, meta) {
Expand Down
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"minimist": ">=0.2.1",
"pandoc-filter": "^0.1.3",
"sanitize-filename": "1.6.1",
"tmp": "0.0.28"
"tmp": "^0.0.28"
}
}
Loading