Skip to content

Commit

Permalink
fix(core): copy package manager config files when installing latest n…
Browse files Browse the repository at this point in the history
…x version in nx migrate (#27032)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #26926
  • Loading branch information
leosvelperez authored Jul 22, 2024
1 parent 5b414d1 commit 0bc8898
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/nx/src/command-line/migrate/command-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { runNxSync } from '../../utils/child-process';
import { linkToNxDevAndExamples } from '../yargs-utils/documentation';
import { execSync } from 'child_process';
import {
copyPackageManagerConfigurationFiles,
detectPackageManager,
getPackageManagerCommand,
} from '../../utils/package-manager';
Expand Down Expand Up @@ -147,6 +148,7 @@ function nxCliPath() {
},
license: 'MIT',
});
copyPackageManagerConfigurationFiles(workspaceRoot, tmpDir);
if (pmc.preInstall) {
// ensure package.json and repo in tmp folder is set to a proper package manager state
execSync(pmc.preInstall, {
Expand Down

0 comments on commit 0bc8898

Please sign in to comment.