Skip to content

Commit

Permalink
feat: let the --cwd option override the monorepo execution directory (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasholzer authored Aug 17, 2023
1 parent d7bbbd2 commit 6051b22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/base-command.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ export default class BaseCommand extends Command {
// configuration file and the API
// ==================================================
const cachedConfig = await actionCommand.getConfig({
cwd: this.jsWorkspaceRoot || this.workingDir,
cwd: flags.cwd ? this.workingDir : this.jsWorkspaceRoot || this.workingDir,
repositoryRoot: rootDir,
packagePath: this.workspacePackage,
// The config flag needs to be resolved from the actual process working directory
Expand Down
2 changes: 1 addition & 1 deletion src/utils/run-build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const runNetlifyBuild = async ({ command, env = {}, options, settings, ti
const devCommand = async (settingsOverrides = {}) => {
let cwd = command.workingDir

if (command.project.workspace?.packages.length) {
if (!options.cwd && command.project.workspace?.packages.length) {
cwd = join(command.project.jsWorkspaceRoot, settings.baseDirectory || '')
}

Expand Down

2 comments on commit 6051b22

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,313
  • Package size: 271 MB

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,313
  • Package size: 271 MB

Please sign in to comment.