1. Use plain Record instead of Map
2. Call fs.realpath inside the utility function Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
import { runDockerContainer } from '@backstage/backend-common';
|
||||
import { Config } from '@backstage/config';
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import { PassThrough } from 'stream';
|
||||
import { Logger } from 'winston';
|
||||
@@ -80,12 +79,10 @@ export class TechdocsGenerator implements GeneratorBase {
|
||||
}
|
||||
|
||||
// Directories to bind on container
|
||||
const mountDirs = new Map([
|
||||
// Need to use realpath here as Docker mounting does not like
|
||||
// symlinks for binding volumes
|
||||
[await fs.realpath(inputDir), '/input'],
|
||||
[await fs.realpath(outputDir), '/output'],
|
||||
]);
|
||||
const mountDirs = {
|
||||
[inputDir]: '/input',
|
||||
[outputDir]: '/output',
|
||||
};
|
||||
|
||||
try {
|
||||
switch (this.options.runGeneratorIn) {
|
||||
|
||||
Reference in New Issue
Block a user