Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure git commit check would not send stderr to the console #516

Merged
merged 1 commit into from
Jul 19, 2016
Merged
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
7 changes: 5 additions & 2 deletions src/server.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

var _ = require("lodash");
var pkg = require("../package.json");
var bcrypt = require("bcrypt-nodejs");
Expand Down Expand Up @@ -81,9 +83,10 @@ function allRequests(req, res, next) {
}

// Information to populate the About section in UI, either from npm or from git
var gitCommit = null;
try {
var gitCommit = require("child_process")
.execSync("git rev-parse --short HEAD") // Returns hash of current commit
gitCommit = require("child_process")
.execSync("git rev-parse --short HEAD 2> /dev/null") // Returns hash of current commit
.toString()
.trim();
} catch (e) {
Expand Down