clang-format
Advanced tools
Comparing version 1.0.8 to 1.0.9
22
index.js
@@ -0,1 +1,2 @@ | ||
#!/usr/bin/env node | ||
var spawn = require('child_process').spawn; | ||
@@ -29,10 +30,5 @@ var os = require('os'); | ||
} | ||
var child_process = spawn(nativeBinary, args, { | ||
stdio: stdio, | ||
cwd: __dirname, | ||
}); | ||
var child_process = spawn(nativeBinary, args, {stdio: stdio}); | ||
child_process.on('close', function(exit) { | ||
if (exit) { | ||
done(exit); | ||
} | ||
if (exit) done(exit); | ||
}); | ||
@@ -44,1 +40,13 @@ return child_process; | ||
module.exports.spawnClangFormat = spawnClangFormat; | ||
if (require.main === module) { | ||
try { | ||
// This indirection is needed so that __dirname does not point to the location of the symlink'ed | ||
// executable but to the js file itself, so that the binaries in /bin/ can be resolved relative | ||
// to that. | ||
clangFormat.spawnClangFormat(process.argv.slice(2), process.exit, 'inherit'); | ||
} catch (e) { | ||
process.stdout.write(e.message); | ||
process.exit(1); | ||
} | ||
} |
{ | ||
"name": "clang-format", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "node wrapper around clang-format", | ||
@@ -11,5 +11,7 @@ "repository": { | ||
"bin": { | ||
"clang-format": "runner.js" | ||
"clang-format": "index.js" | ||
}, | ||
"scripts": {"test": "./test.sh"}, | ||
"scripts": { | ||
"test": "./test.sh" | ||
}, | ||
"contributors": [ | ||
@@ -16,0 +18,0 @@ "Alex Eagle <alexeagle@google.com>", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3817331
9
46