dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/tmp/test/graceful-sync.js
Cyryl Płotnicki 2f946d6200 Add .vscode
2016-09-11 10:29:13 +02:00

20 lines
319 B
JavaScript

var
tmp = require('../lib/tmp'),
spawn = require('./spawn-sync');
var graceful = spawn.arg;
if (graceful) {
tmp.setGracefulCleanup();
}
try {
var result = spawn.tmpFunction();
spawn.out(result.name, function () {
throw new Error('Thrown on purpose');
});
}
catch (e) {
spawn.err(e, spawn.exit);
}