Skip to content

Commit

Permalink
fix(core): do not create project graph when creating a sandbox in cre…
Browse files Browse the repository at this point in the history
…ate-nx-workspace
  • Loading branch information
vsavkin committed Jun 1, 2022
1 parent 2f8aea8 commit 10e9992
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/create-nx-plugin/bin/create-nx-plugin.ts
Expand Up @@ -47,7 +47,7 @@ function createSandbox(packageManager: string) {
license: 'MIT',
});

execSync(`${packageManager} install --silent`, {
execSync(`${packageManager} install --silent --ignore-scripts`, {
cwd: tmpDir,
stdio: [0, 1, 2],
});
Expand Down
2 changes: 1 addition & 1 deletion packages/create-nx-workspace/bin/create-nx-workspace.ts
Expand Up @@ -721,7 +721,7 @@ async function createSandbox(packageManager: PackageManager) {
})
);

await execAndWait(`${install} --silent`, tmpDir);
await execAndWait(`${install} --silent --ignore-scripts`, tmpDir);

installSpinner.succeed();
} catch (e) {
Expand Down
7 changes: 6 additions & 1 deletion packages/nx/bin/compute-project-graph.ts
@@ -1,8 +1,13 @@
import { createProjectGraphAsync } from '../src/project-graph/project-graph';
import { workspaceRoot } from '../src/utils/workspace-root';
import { fileExists } from '../src/utils/fileutils';
import { join } from 'path';

(async () => {
try {
await createProjectGraphAsync();
if (fileExists(join(workspaceRoot, 'nx.json'))) {
await createProjectGraphAsync();
}
} catch (e) {
// Do not error since this runs in a postinstall
}
Expand Down

1 comment on commit 10e9992

@vercel
Copy link

@vercel vercel bot commented on 10e9992 Jun 1, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx.dev

Please sign in to comment.