Pass flag from command down to function
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fixed the `--alwaysYarnPack` flag on the`backstage-cli build-workspace` command.
|
||||
@@ -17,12 +17,17 @@
|
||||
import fs from 'fs-extra';
|
||||
import { createDistWorkspace } from '../lib/packager';
|
||||
|
||||
export default async (dir: string, packages: string[]) => {
|
||||
type Options = {
|
||||
alwaysYarnPack?: boolean;
|
||||
};
|
||||
|
||||
export default async (dir: string, packages: string[], options: Options) => {
|
||||
if (!(await fs.pathExists(dir))) {
|
||||
throw new Error(`Target workspace directory doesn't exist, '${dir}'`);
|
||||
}
|
||||
|
||||
await createDistWorkspace(packages, {
|
||||
targetDir: dir,
|
||||
alwaysYarnPack: options.alwaysYarnPack,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user