mirror of
https://github.com/S2-/gitlit
synced 2025-08-04 05:10:05 +02:00
packager
This commit is contained in:
20
app/node_modules/tmp/test/graceful-sync.js
generated
vendored
Normal file
20
app/node_modules/tmp/test/graceful-sync.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user