Socket
Socket
Sign inDemoInstall

husky

Package Overview
Dependencies
0
Maintainers
1
Versions
207
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.1 to 0.5.2

2

package.json
{
"name": "husky",
"version": "0.5.1",
"version": "0.5.2",
"description": "Prevents bad commit or push (git hooks, pre-commit, pre-push and all that stuff...)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,15 +16,21 @@ var fs = require('fs')

var filename = dir + '/' + name
var data = [
'#!/bin/sh',
'# husky',
'PATH="' + process.env.PATH + '"',
cmd,
'if [ $? -ne 0 ]; then',
' echo',
' echo "husky - ' + name + ' hook failed (add -n to bypass)"',
' echo',
' exit 1',
'fi'
].join('\n')
var data =
'#!/bin/sh\n'
+ '# husky\n'
// Needed on OS X when nvm is used and committing from Sublime Text
if (process.platform === 'darwin') {
data += 'PATH="' + process.env.PATH + '"\n'
}
data +=
cmd + '\n'
+ 'if [ $? -ne 0 ]; then\n'
+ ' echo\n'
+ ' echo "husky - ' + name + ' hook failed (add -n to bypass)"\n'
+ ' echo\n'
+ ' exit 1\n'
+ 'fi\n'
if (!fs.existsSync(filename)) {

@@ -31,0 +37,0 @@ this.write(filename, data)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc