File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,11 @@ You can use the optional "--address" and "--port" flags to control what address
107
107
// Request the info file
108
108
info , err = store .GetInfoFile ()
109
109
if err != nil {
110
+ _ = store .ReleaseLock (context .Background ())
110
111
return NewExecError (ErrorApp , "Error requesting the info file" , err )
111
112
}
112
113
if info == nil {
114
+ _ = store .ReleaseLock (context .Background ())
113
115
return NewExecError (ErrorUser , "Repository is not initialized" , err )
114
116
}
115
117
@@ -118,6 +120,7 @@ You can use the optional "--address" and "--port" flags to control what address
118
120
// Derive the master key
119
121
masterKey , keyId , errMessage , err := GetMasterKey (info )
120
122
if err != nil {
123
+ _ = store .ReleaseLock (context .Background ())
121
124
return NewExecError (ErrorUser , errMessage , err )
122
125
}
123
126
store .SetMasterKey (keyId , masterKey )
@@ -145,6 +148,9 @@ You can use the optional "--address" and "--port" flags to control what address
145
148
}
146
149
err = srv .Start (cmd .Context (), flagBindAddress , flagBindPort )
147
150
if err != nil {
151
+ if store != nil {
152
+ _ = store .ReleaseLock (context .Background ())
153
+ }
148
154
return NewExecError (ErrorApp , "Could not start server" , err )
149
155
}
150
156
You can’t perform that action at this time.
0 commit comments