Skip to content

Commit

Permalink
Handle "-" as stdin/stdout mode (bazelbuild#65)
Browse files Browse the repository at this point in the history
* Handle "-" as stdin/stdout mode
  • Loading branch information
rishiloyola authored and pmbethe09 committed Mar 15, 2017
1 parent c36e995 commit 7d7b76a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions buildifier/buildifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ func main() {

diff = differ.Find()

// TODO(bazel-team): Handle "-" as stdin/stdout mode too.

if len(args) == 0 {
if len(args) == 0 || (len(args) == 1 && args[0] == "-") {
// Read from stdin, write to stdout.
data, err := ioutil.ReadAll(os.Stdin)
if err != nil {
Expand Down

0 comments on commit 7d7b76a

Please sign in to comment.