Skip to content

Stdout is empty on Git log command #439

@oric01

Description

@oric01
  • node 4.4.0
  • shelljs 0.7.0
  • windows 7, using git bash

Using shelljs to stdout Git log does not work (in grunt file currently).

var shell = require('shelljs');
console.log(shell.exec('node -v'));

Works, console stdout : stdout: 'v4.4.0\r\n'

console.log(shell.exec('git log --no-merges --pretty=medium HEAD^...HEAD'));

Does not works, Works, console stdout : stdout: ''

While this Git log works in Git bash :

$ git log --no-merges --pretty=medium HEAD^...HEAD
commit be9a8bca6783f9911f0601afa00203f9a161ffd9
Author: xxx <xxx.xxx@xxx>
Date:   Tue Apr 26 17:02:47 2016 +0200

    feat(streaming): XXX : XXX

    - change 1
    - change 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions