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
1391570e
Unverified
Commit
1391570e
authored
1 year ago
by
Sigurd Spieckermann
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(validator): use absolute path for all `.js` configs (#27139)
parent
f3be8d96
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/workers/global/config/parse/file.ts
+4
-5
4 additions, 5 deletions
lib/workers/global/config/parse/file.ts
with
4 additions
and
5 deletions
lib/workers/global/config/parse/file.ts
+
4
−
5
View file @
1391570e
...
@@ -27,7 +27,9 @@ export async function getParsedContent(file: string): Promise<RenovateConfig> {
...
@@ -27,7 +27,9 @@ export async function getParsedContent(file: string): Promise<RenovateConfig> {
)
as
RenovateConfig
;
)
as
RenovateConfig
;
case
'
.cjs
'
:
case
'
.cjs
'
:
case
'
.js
'
:
{
case
'
.js
'
:
{
const
tmpConfig
=
await
import
(
file
);
const
tmpConfig
=
await
import
(
upath
.
isAbsolute
(
file
)
?
file
:
`
${
process
.
cwd
()}
/
${
file
}
`
);
let
config
=
tmpConfig
.
default
let
config
=
tmpConfig
.
default
?
tmpConfig
.
default
?
tmpConfig
.
default
:
/* istanbul ignore next: hard to test */
tmpConfig
;
:
/* istanbul ignore next: hard to test */
tmpConfig
;
...
@@ -43,10 +45,7 @@ export async function getParsedContent(file: string): Promise<RenovateConfig> {
...
@@ -43,10 +45,7 @@ export async function getParsedContent(file: string): Promise<RenovateConfig> {
}
}
export
async
function
getConfig
(
env
:
NodeJS
.
ProcessEnv
):
Promise
<
AllConfig
>
{
export
async
function
getConfig
(
env
:
NodeJS
.
ProcessEnv
):
Promise
<
AllConfig
>
{
let
configFile
=
env
.
RENOVATE_CONFIG_FILE
??
'
config.js
'
;
const
configFile
=
env
.
RENOVATE_CONFIG_FILE
??
'
config.js
'
;
if
(
!
upath
.
isAbsolute
(
configFile
))
{
configFile
=
`
${
process
.
cwd
()}
/
${
configFile
}
`
;
}
if
(
env
.
RENOVATE_CONFIG_FILE
&&
!
(
await
fs
.
pathExists
(
configFile
)))
{
if
(
env
.
RENOVATE_CONFIG_FILE
&&
!
(
await
fs
.
pathExists
(
configFile
)))
{
logger
.
fatal
(
logger
.
fatal
(
...
...
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