Skip to content

Commit 2f88d00

Browse files
committed
fix: upgrade csharpier correctly
1 parent 7db1e82 commit 2f88d00

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

scripts/formatter.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ export async function formatter(language: string, cwd: string): Promise<void> {
66
switch (language) {
77
case 'csharp':
88
if (cwd.includes('tests') || cwd.includes('snippets') || cwd.includes('guides')) {
9-
await run(
10-
'dotnet tool install --allow-roll-forward csharpier && dotnet format --no-restore && dotnet tool restore && dotnet dotnet-csharpier .',
11-
{
12-
cwd,
13-
language,
14-
},
15-
);
9+
await run('dotnet format --no-restore && dotnet tool restore && dotnet dotnet-csharpier .', {
10+
cwd,
11+
language,
12+
});
1613
} else {
17-
await run('dotnet tool install --allow-roll-forward csharpier && dotnet format', { cwd, language });
14+
await run('dotnet format', { cwd, language });
1815
}
1916
break;
2017
case 'dart':

templates/csharp/snippets/dotnet-tools.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"isRoot": true,
44
"tools": {
55
"csharpier": {
6-
"version": "0.29.2",
6+
"version": "0.30.1",
77
"commands": [
88
"dotnet-csharpier"
99
]
1010
}
1111
}
12-
}
12+
}

tests/output/csharp/.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"csharpier": {
6-
"version": "0.29.2",
6+
"version": "0.30.1",
77
"commands": [
88
"dotnet-csharpier"
99
]

0 commit comments

Comments
 (0)