Expose new option in techdocs cli generate command
The re-assignment of container user on macOS/Linux is troublesome when running on rootless GitHub runners; adding a way to bypass this for generation. This should be a non-breaking change and just adds functionality. Signed-off-by: Kamil Zainal <gh@akza.dev>
This commit is contained in:
@@ -97,6 +97,7 @@ export class TechdocsGenerator implements GeneratorBase {
|
||||
logger: childLogger,
|
||||
logStream,
|
||||
siteOptions,
|
||||
runAsDefaultUser
|
||||
} = options;
|
||||
|
||||
// Do some updates to mkdocs.yml before generating docs e.g. adding repo_url
|
||||
@@ -171,6 +172,7 @@ export class TechdocsGenerator implements GeneratorBase {
|
||||
// write to, otherwise they will just fail trying to write to /
|
||||
envVars: { HOME: '/tmp' },
|
||||
pullImage: this.options.pullImage,
|
||||
defaultUser: runAsDefaultUser
|
||||
});
|
||||
childLogger.info(
|
||||
`Successfully generated docs from ${inputDir} into ${outputDir} using techdocs-container`,
|
||||
|
||||
@@ -64,6 +64,7 @@ export type GeneratorRunOptions = {
|
||||
logger: Logger;
|
||||
logStream?: Writable;
|
||||
siteOptions?: { name?: string };
|
||||
runAsDefaultUser?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user