Skip to content

Commit d1b4021

Browse files
authored
quickfix: regression on commit command (#106)
1 parent b539b07 commit d1b4021

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

cmd/protolock/main.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ func status(cfg *protolock.Config) {
132132
os.Exit(1)
133133
}
134134

135-
os.Exit(code)
135+
if code != 0 {
136+
os.Exit(code)
137+
}
136138
}
137139

138140
func saveToLockFile(cfg protolock.Config, r io.Reader) error {

proto.lock

+5
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,11 @@
363363
"name": "age",
364364
"type": "int32"
365365
},
366+
{
367+
"id": 101,
368+
"name": "newnew",
369+
"type": "int32"
370+
},
366371
{
367372
"id": 44,
368373
"name": "msg",

testdata/test.proto

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ message Channel {
2222
string description = 3;
2323
string foo = 4;
2424
int32 age = 5;
25+
int32 newnew = 101;
2526

2627
message A { int32 id = 1; }
2728

0 commit comments

Comments
 (0)