mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
fix: deleteLocalFile only if localDir is defined
This commit is contained in:
parent
123a0f3775
commit
2dc0fd6a4c
1 changed files with 4 additions and 2 deletions
|
@ -53,8 +53,10 @@ export async function writeLocalFile(
|
|||
}
|
||||
|
||||
export async function deleteLocalFile(fileName: string): Promise<void> {
|
||||
const localFileName = join(localDir, fileName);
|
||||
await fs.remove(localFileName);
|
||||
if (localDir) {
|
||||
const localFileName = join(localDir, fileName);
|
||||
await fs.remove(localFileName);
|
||||
}
|
||||
}
|
||||
|
||||
// istanbul ignore next
|
||||
|
|
Loading…
Reference in a new issue