jenkins-bot has submitted this change and it was merged.
Change subject: Fix the registry file reading
......................................................................
Fix the registry file reading
If registry was not provided in the service configuration, __dirname was
prepended twice.
Regression from I5a3b87141da586955b5749e96f683262561c1bbd
Change-Id: Ic4a489244a4524d2a904fca4081cbd5edc65fdfb
---
M app.js
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/app.js b/app.js
index 9d01ce4..7133b50 100644
--- a/app.js
+++ b/app.js
@@ -73,11 +73,13 @@
// set up the registry
if ( !app.conf.registry ) {
app.conf.registry = __dirname + '/registry.yaml';
+ } else if ( typeof app.conf.registry === 'string' ) {
+ app.conf.registry = __dirname + '/' + app.conf.registry;
}
if ( app.conf.registry.constructor !== Object ) {
try {
- app.conf.registry = yaml.safeLoad( fs.readFileSync(
__dirname + '/' + app.conf.registry ) );
+ app.conf.registry = yaml.safeLoad( fs.readFileSync(
app.conf.registry ) );
} catch ( e ) {
app.logger.log( 'warn/registry', 'Could not load the
registry: ' + e );
app.conf.registry = {};
--
To view, visit https://gerrit.wikimedia.org/r/284872
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4a489244a4524d2a904fca4081cbd5edc65fdfb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: KartikMistry <[email protected]>
Gerrit-Reviewer: Mobrovac <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits