mirror of
https://github.com/markedjs/marked
synced 2024-11-23 09:48:17 +00:00
print help message when man is unavailable
This commit is contained in:
parent
4179e639ed
commit
823a080420
10
bin/marked
10
bin/marked
@ -23,9 +23,13 @@ function help() {
|
||||
customFds: [0, 1, 2]
|
||||
};
|
||||
|
||||
spawn('man',
|
||||
[__dirname + '/../man/marked.1'],
|
||||
options);
|
||||
spawn('man', [__dirname + '/../man/marked.1'], options)
|
||||
.on('error', function(err) {
|
||||
fs.readFile(__dirname + '/../man/marked.1.txt', 'utf8', function(err, data) {
|
||||
if (err) throw err;
|
||||
console.log(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user