Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Hook.prototype.log = function log (lines, exit) {
*/
Hook.prototype.initialize = function initialize () {
['git', 'npm'].forEach(function each (binary) {
try { this[binary] = which.sync(binary) } catch (e) {}
try { this[binary] = which.sync(binary) } catch {}
}, this)

//
Expand All @@ -164,7 +164,7 @@ Hook.prototype.initialize = function initialize () {
try {
process.env.PATH += path.delimiter + path.dirname(process.env._)
this.npm = which.sync('npm')
} catch (e) {
} catch {
return this.log(this.format(Hook.log.binary, 'npm'), 0)
}
}
Expand Down
2 changes: 1 addition & 1 deletion install.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ if (exists(precommit) && !fs.lstatSync(precommit).isSymbolicLink()) {
// We cannot create a symlink over an existing file so make sure it's gone and
// finish the installation process.
//
try { fs.unlinkSync(precommit) } catch (e) {}
try { fs.unlinkSync(precommit) } catch {}

// Create generic precommit hook that launches this modules hook (as well
// as stashing - unstashing the unstaged changes)
Expand Down
Loading