Skip to content

Commit 07811c7

Browse files
committed
fix(core): post-install shouldn't depend on nx packages
1 parent da52f65 commit 07811c7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/core/src/tasks/post-install.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { DotNetClient, dotnetFactory } from '@nx-dotnet/dotnet';
1+
import { execSync } from 'child_process';
22

33
try {
4-
const client = new DotNetClient(dotnetFactory());
5-
const sdkVersion = client.printSdkVersion();
4+
const version = execSync('dotnet --version').toString('utf-8').trim();
65
console.info(
7-
`[nx-dotnet] .NET SDK ${sdkVersion} will be used for .NET CLI commands`,
6+
`[nx-dotnet] .NET SDK ${version} will be used for .NET CLI commands`,
87
);
98
} catch {
109
console.warn(`[nx-dotnet] [WARN] .NET SDK NOT FOUND`);

0 commit comments

Comments
 (0)