Closed ycao56 closed 8 years ago
https://github.com/ibm-cloud-solutions/hubot-ibmcloud-cognitive-lib/blob/master/src/lib/initDb.js#L114 exits the process and fails the install
@normanb I previously talked to @jlpadilla about this. Can you take a look? Can we throw a warning instead of failing the install when db already exists?
yes, definitely. I can change that.
On Fri, Aug 5, 2016 at 3:35 PM, Yu Cao notifications@github.com wrote:
@normanb https://github.com/normanb I previously talked to @jlpadilla https://github.com/jlpadilla about this. Can you take a look? Can we throw a warning instead of failing the install when db already exists?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ibm-cloud-solutions/hubot-ibmcloud-cognitive-lib/issues/13#issuecomment-237942865, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQ67VP33bzi6ju2sRm3P6JhGVO7Xbmaks5qc5BrgaJpZM4Jd_il .
For those modules with nlc capabilities,
postInsall: initDb src/nlc/NLC.json
has been added in order to initialize the db automatically after install. If user install it twice, it will fail with below errors{ [conflict: Document update conflict] status: 409, name: 'conflict', message: 'Document update conflict', error: true }