Skip to content

Commit

Permalink
fix(core): post-install shouldn't depend on nx packages
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Apr 1, 2022
1 parent da52f65 commit 07811c7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/core/src/tasks/post-install.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { DotNetClient, dotnetFactory } from '@nx-dotnet/dotnet';
import { execSync } from 'child_process';

try {
const client = new DotNetClient(dotnetFactory());
const sdkVersion = client.printSdkVersion();
const version = execSync('dotnet --version').toString('utf-8').trim();
console.info(
`[nx-dotnet] .NET SDK ${sdkVersion} will be used for .NET CLI commands`,
`[nx-dotnet] .NET SDK ${version} will be used for .NET CLI commands`,
);
} catch {
console.warn(`[nx-dotnet] [WARN] .NET SDK NOT FOUND`);
Expand Down

0 comments on commit 07811c7

Please sign in to comment.