Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
163bad03
Commit
163bad03
authored
6 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix: catch JSON.parse error for renovate config
parent
eb21abf1
Branches
Branches containing commit
Tags
12.60.1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/workers/repository/init/config.js
+10
-1
10 additions, 1 deletion
lib/workers/repository/init/config.js
with
10 additions
and
1 deletion
lib/workers/repository/init/config.js
+
10
−
1
View file @
163bad03
...
@@ -89,7 +89,16 @@ async function mergeRenovateConfig(config) {
...
@@ -89,7 +89,16 @@ async function mergeRenovateConfig(config) {
error
.
validationMessage
=
JSON
.
stringify
(
jsonValidationError
);
error
.
validationMessage
=
JSON
.
stringify
(
jsonValidationError
);
throw
error
;
throw
error
;
}
}
renovateJson
=
JSON
.
parse
(
renovateConfig
);
try
{
renovateJson
=
JSON
.
parse
(
renovateConfig
);
}
catch
(
err
)
/* istanbul ignore next */
{
logger
.
debug
({
renovateConfig
},
'
Error parsing renovate config
'
);
const
error
=
new
Error
(
'
config-validation
'
);
error
.
configFile
=
configFile
;
error
.
validationError
=
'
Invalid JSON (parsing failed)
'
;
error
.
validationMessage
=
'
JSON.parse error:
'
+
err
.
message
;
throw
error
;
}
logger
.
info
({
config
:
renovateJson
},
'
renovate.json config
'
);
logger
.
info
({
config
:
renovateJson
},
'
renovate.json config
'
);
}
}
const
migratedConfig
=
await
migrateAndValidate
(
config
,
renovateJson
);
const
migratedConfig
=
await
migrateAndValidate
(
config
,
renovateJson
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment