Skip to content

Commit d1566db

Browse files
notyashhhCopilot
andauthored
[MCP] Patch windows kernel support (#28158)
Co-authored-by: Copilot <[email protected]>
1 parent 458d977 commit d1566db

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

src/Maps/Maps.Autorest/test/utils.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,3 @@ function cleanupEnv() {
6868
# Clean resources you create for testing
6969
Remove-AzResourceGroup -Name $env.resourceGroup
7070
}
71-

tools/Mcp/src/services/utils.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { execSync } from 'child_process';
55
import path from 'path';
66

77
const _pwshCD = (path: string): string => { return `pwsh -Command "$path = resolve-path ${path} | Set-Location"` }
8-
const _autorest = "autorest --reset; autorest"
8+
const _autorestReset = "autorest --reset"
9+
const _autorest = "autorest"
910
const _pwshBuild = "pwsh -File build-module.ps1"
1011

1112
function testYaml() {
@@ -21,12 +22,17 @@ function testYaml() {
2122
}
2223

2324
export function generateAndBuild(workingDirectory: string): void {
24-
const genBuildCommand = `${_autorest}; ${_pwshBuild};`;
25-
try {
26-
const result = execSync(genBuildCommand, { stdio: 'inherit', cwd: workingDirectory });
27-
} catch (error) {
28-
console.error("Error executing command:", error);
29-
throw error;
25+
const genBuildCommands = [_autorestReset, _autorest, _pwshBuild]
26+
27+
for (const command of genBuildCommands) {
28+
try {
29+
console.log(`Executing command: ${command}`);
30+
const result = execSync(command, { stdio: 'inherit', cwd: workingDirectory });
31+
}
32+
catch (error) {
33+
console.error("Error executing command:", error);
34+
throw error;
35+
}
3036
}
3137
}
3238

tools/Mcp/test/vscode/mcpprompt.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- Execute commands confidently without asking for confirmation.
77
- Follow all steps carefully and halt if any MCP tool is missing or fails.
88
- Think independently using your full context and reset if needed.
9-
- Provide brief status updates at each step.
9+
- No need to provide status updates at each step.
1010
- FOLLOW ALL THE STEPS. DO NOT SKIP ANY STEPS. DO NOT MISS ANY STEPS.
1111
- If an mcp tool is not found or the tool fails then please halt execution.
1212

@@ -26,9 +26,9 @@
2626
## Stage 2: Generating partner powershell module
2727
- FOLLOW ALL THE STEPS. DO NOT SKIP ANY STEPS.
2828
- Navigate to the `src` folder in the home "azure-powershell" directory.
29-
- Create a new folder named <serviceName> and within it a new folder named `<serviceName>.Autorest`. You can use the command - `mkdir -p <serviceName>/<serviceName>.Autorest `
29+
- Create a new folder named <serviceName> and within it a new folder named `<serviceName>.Autorest`. (If not already present)
3030
- Move into the new folder `<serviceName>/<serviceName>.Autorest`, using the command `cd <serviceName>/<serviceName>.Autorest`.
31-
- Create a new file `README.md`.
31+
- Create a new file `README.md`. (If not already present)
3232
- Add the content labelled below as `Readme Content` in this file.
3333
- Use the "generate-autorest" mcp tool to generate the <serviceName> module.
3434
- Stage 2 Complete.

0 commit comments

Comments
 (0)