diff --git a/build-tools/packages/build-cli/README.md b/build-tools/packages/build-cli/README.md index 81e878b3cb8a..3e5f099db1a4 100644 --- a/build-tools/packages/build-cli/README.md +++ b/build-tools/packages/build-cli/README.md @@ -580,9 +580,7 @@ USAGE FLAGS -v, --verbose Verbose logging. - --dirname= [default: - C:\Users\sdeshpande\Documents\FluidFramework\build-tools\packages\build-cli\lib\commands\run] - Directory + --dirname= [default: current directory] Directory containing bundle stats input DESCRIPTION Generate a report from input bundle stats collected through the collect bundleStats command. diff --git a/build-tools/packages/build-cli/src/commands/run/bundleStats.ts b/build-tools/packages/build-cli/src/commands/run/bundleStats.ts index 47be57a3797c..a7c290a456d8 100644 --- a/build-tools/packages/build-cli/src/commands/run/bundleStats.ts +++ b/build-tools/packages/build-cli/src/commands/run/bundleStats.ts @@ -12,9 +12,7 @@ export default class RunBundlestats extends BaseCommand { const flags = this.processedFlags; - execSync(`npx danger ci -d ${flags.dirname}/lib/dangerfile.js`, { stdio: "inherit" }); + // eslint-disable-next-line unicorn/prefer-module + const dirname = flags.dirname ?? __dirname; + + execSync(`npx danger ci -d ${dirname}/lib/dangerfile.js`, { stdio: "inherit" }); } }