From 1bc2c290d4a9fe99d192e8c545fcbe02eec1c28a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 30 Jan 2026 22:28:28 +0000 Subject: [PATCH 01/17] Update changelog.md for version 0.0.400 --- changelog.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/changelog.md b/changelog.md index 42dc91f4..8ad15a94 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,31 @@ +## 0.0.400 - 2026-01-30 + +- Add MCP server instructions support +- Timeline displays user responses to `ask_user` tool prompts with username +- Ordered lists display with numbers instead of dashes +- Add theme picker with `/theme` command and GitHub Dark/Light themes +- Fix support for pasting large content on Windows Terminal +- Better handle large results from grep and glob tools to avoid memory issues +- CLI now sends DELETE requests to remove MCP servers when shutting down +- Fix not being able to arrow key out of text inputs in select lists +- ACP server supports changing models during a session +- ACP server support permission flags: --yolo, --allow-all, etc. and permissions config +- Show progress indicator in terminal tab when thinking +- Remove bundled LSP servers (TypeScript, Python) +- Improve compatibility with remote MCP servers that use OAuth +- Markdown table headers display in bold +- Add autopilot mode for autonomous task completion (experimental) +- Add fuzzy search to model picker +- Freeform text input in list pickers works correctly +- Add `copilot plugin` subcommand for non-interactive plugin management +- CLI is more responsive in sessions with many messages +- Shell path detection more accurately handles spaces, quotes, and Windows switches +- Diff mode file list uses carousel navigation, showing up to 5 files at a time +- Holding backspace continues deleting text +- Better support for UNIX keyboard bindings (Ctrl+A/E/W/U/K, Alt+arrows) and multiline content in various text inputs +- Add `launch_messages` config for startup announcements +- The Code Review tool handles large changesets by ignoring build artifacts and limiting to 100 files + ## 0.0.399 - 2026-01-29 - Compaction messages show clearer command hints to view checkpoint summaries From a5797c96a7045e11b88a548d3ed481102fececb7 Mon Sep 17 00:00:00 2001 From: Serhii Vechrenko Date: Sat, 31 Jan 2026 18:36:13 -0800 Subject: [PATCH 02/17] docs: add LSP server configuration guide to README --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/README.md b/README.md index d5dae010..2e62b99f 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,64 @@ Each time you submit a prompt to GitHub Copilot CLI, your monthly quota of premi For more information about how to use the GitHub Copilot CLI, see [our official documentation](https://docs.github.com/copilot/concepts/agents/about-copilot-cli). +## 🔧 Configuring LSP Servers + +GitHub Copilot CLI supports Language Server Protocol (LSP) for enhanced code intelligence. This feature is currently experimental and provides intelligent code features like go-to-definition, hover information, and diagnostics. + +### Enabling LSP Support + +To use LSP features, you must enable experimental mode: + +```bash +copilot --experimental +``` + +Or use the `/experimental` command within an interactive session. + +### Installing Language Servers + +Copilot CLI does not bundle LSP servers. You need to install them separately. For example, to set up TypeScript support: + +```bash +npm install -g typescript-language-server +``` + +For other languages, install the corresponding LSP server and configure it following the same pattern shown below. + +### Configuring LSP Servers + +LSP servers are configured through a dedicated LSP configuration file. You can configure LSP servers at the user level or repository level: + +**User-level configuration** (applies to all projects): +Edit `~/.copilot/lsp-config.json` + +**Repository-level configuration** (applies to specific project): +Create `.github/lsp.json` in your repository root + +Example configuration: + +```json +{ + "lspServers": { + "typescript": { + "command": "typescript-language-server", + "args": ["--stdio"], + "disabled": false, + "fileExtensions": { + ".ts": "typescript", + ".tsx": "typescript" + } + } + } +} +``` + +### Viewing LSP Server Status + +Check configured LSP servers using the `/lsp` command in an interactive session, or view your configuration files directly. + +For more information, see the [changelog](./changelog.md). + ## 📢 Feedback and Participation We're excited to have you join us early in the Copilot CLI journey. From c13a41d1cc7044bf5356f8a1777f1d90dddf74fc Mon Sep 17 00:00:00 2001 From: Serhii Vechrenko Date: Mon, 2 Feb 2026 11:27:13 -0800 Subject: [PATCH 03/17] Update LSP section in README to remove experimental flag info --- README.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/README.md b/README.md index 2e62b99f..f696e2bf 100644 --- a/README.md +++ b/README.md @@ -124,17 +124,7 @@ For more information about how to use the GitHub Copilot CLI, see [our official ## 🔧 Configuring LSP Servers -GitHub Copilot CLI supports Language Server Protocol (LSP) for enhanced code intelligence. This feature is currently experimental and provides intelligent code features like go-to-definition, hover information, and diagnostics. - -### Enabling LSP Support - -To use LSP features, you must enable experimental mode: - -```bash -copilot --experimental -``` - -Or use the `/experimental` command within an interactive session. +GitHub Copilot CLI supports Language Server Protocol (LSP) for enhanced code intelligence. This feature provides intelligent code features like go-to-definition, hover information, and diagnostics. ### Installing Language Servers @@ -164,7 +154,6 @@ Example configuration: "typescript": { "command": "typescript-language-server", "args": ["--stdio"], - "disabled": false, "fileExtensions": { ".ts": "typescript", ".tsx": "typescript" From 572d0f06a840027ba6e93921f30f8220b5f644bc Mon Sep 17 00:00:00 2001 From: jmoseley Date: Mon, 2 Feb 2026 11:33:56 -0800 Subject: [PATCH 04/17] docs: add experimental mode section to README --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index d5dae010..e97d51a1 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,19 @@ Launch `copilot` in a folder that contains code you want to work with. By default, `copilot` utilizes Claude Sonnet 4.5. Run the `/model` slash command to choose from other available models, including Claude Sonnet 4 and GPT-5. +### Experimental Mode + +Experimental mode enables access to new features that are still in development. You can activate experimental mode by: + +- Launching with the `--experimental` flag: `copilot --experimental` +- Using the `/experimental` slash command from within the CLI + +Once activated, the setting is persisted in your config, so the `--experimental` flag is no longer needed on subsequent launches. + +#### Experimental Features + +- **Autopilot mode:** Press `Shift+Tab` to toggle autopilot mode, which encourages the agent to continue working until a task is completed. + Each time you submit a prompt to GitHub Copilot CLI, your monthly quota of premium requests is reduced by one. For information about premium requests, see [About premium requests](https://docs.github.com/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests). For more information about how to use the GitHub Copilot CLI, see [our official documentation](https://docs.github.com/copilot/concepts/agents/about-copilot-cli). From cc589c42a7c71d007670dd94ee52978f178be2d1 Mon Sep 17 00:00:00 2001 From: Jeremy Moseley Date: Mon, 2 Feb 2026 11:43:06 -0800 Subject: [PATCH 05/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e97d51a1..36ce2716 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ Once activated, the setting is persisted in your config, so the `--experimental` #### Experimental Features -- **Autopilot mode:** Press `Shift+Tab` to toggle autopilot mode, which encourages the agent to continue working until a task is completed. +- **Autopilot mode:** Autopilot is a new mode (press `Shift+Tab` to cycle through modes), which encourages the agent to continue working until a task is completed. Each time you submit a prompt to GitHub Copilot CLI, your monthly quota of premium requests is reduced by one. For information about premium requests, see [About premium requests](https://docs.github.com/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests). From 7aff5865e0a1e09c28900c5179020266d16bb598 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Feb 2026 15:12:17 +0000 Subject: [PATCH 06/17] Update changelog.md for version 0.0.401 --- changelog.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/changelog.md b/changelog.md index 8ad15a94..938b33b8 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,19 @@ +## 0.0.401 - 2026-02-03 + +- Support `.agents/skills` directory for auto-loading skills +- Improve handling of chat history when switching between model families +- MCP tools returning structuredContent now display correctly in CLI +- Support Claude-style .mcp.json format without mcpServers wrapper +- Inserting new line with shift+enter keybinding in VS Code integrated terminal +- Large multi-line pastes work correctly +- ACP terminal-auth passes correct arguments to login +- Arrow and special keys work reliably when held down +- Slash command ghost text appends correctly +- Add `copilot login` subcommand and support ACP terminal-auth +- Add agentStop and subagentStop hooks to control agent completion +- CLI handles unknown keypresses gracefully +- /diff displays accurate line numbers with dual column layout + ## 0.0.400 - 2026-01-30 - Add MCP server instructions support From 369f5d8caaa631c0de93a2cadedcf6b0f8c07d5a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Feb 2026 21:35:16 +0000 Subject: [PATCH 07/17] Update changelog.md for version 0.0.402 --- changelog.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/changelog.md b/changelog.md index 938b33b8..62cb3ca0 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,14 @@ +## 0.0.402 - 2026-02-03 + +- ACP server supports agent and plan session modes +- MCP configuration applies to ACP mode +- Agent creation wizard styling improvements +- Custom agents with unknown fields load with warnings instead of errors +- Custom agents receive environment context when run as subagents +- Plugins can provide hooks for session lifecycle events +- Plugin update command works for direct plugins and handles Windows file locks +- Stop MCP servers when uninstalling plugins + ## 0.0.401 - 2026-02-03 - Support `.agents/skills` directory for auto-loading skills From 17063589c96a7f353a72bc809ea33b48f80950d7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 5 Feb 2026 08:43:25 +0000 Subject: [PATCH 08/17] Update changelog.md for version 0.0.403 --- changelog.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/changelog.md b/changelog.md index 62cb3ca0..2b71c3f0 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,18 @@ +## 0.0.403 - 2026-02-04 + +- Windows Task Manager displays correct application name +- Introduce security check preventing use of modules outside of application bundle +- ACP model info includes usage multiplier and enablement status +- Fix logic checking user organization membership +- Stop MCP servers before updating plugins +- Detached shell processes work on vanilla macOS installations +- Escape key consistently aborts permission dialogs regardless of selection +- Plugin skills work in prompt mode +- Config files preserve custom fields when CLI updates them +- Reasoning summaries enabled by default for supporting models +- Support comma-separated tools in custom agent frontmatter +- Skills with unknown frontmatter fields now load with warnings instead of being silently skipped + ## 0.0.402 - 2026-02-03 - ACP server supports agent and plan session modes From 5b0f1197a24c1e86931c49166bc726d5408db6f7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 5 Feb 2026 19:08:13 +0000 Subject: [PATCH 09/17] Update changelog.md for version 0.0.404 --- changelog.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/changelog.md b/changelog.md index 2b71c3f0..5069a13f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,15 @@ +## 0.0.404 - 2026-02-05 + +- Add support for claude-opus-4.6 model +- `/allow-all` and `/yolo` execute immediately +- MCP servers shut down concurrently for improved performance +- Cancel --resume session picker to start a new session +- MCP server configurations default to all tools when tools parameter not specified +- Add `/tasks` command to view and manage background tasks +- Enable background agents for all users +- Simplify and clarify `/delegate` command messaging +- GITHUB_TOKEN environment variable now accessible in agent shell sessions + ## 0.0.403 - 2026-02-04 - Windows Task Manager displays correct application name From a7b0205dba5834ee91264cd3427bc46fd0c54c0f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 5 Feb 2026 22:47:58 +0000 Subject: [PATCH 10/17] Update changelog.md for version 0.0.405 --- changelog.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog.md b/changelog.md index 5069a13f..6d91cb15 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,10 @@ +## 0.0.405 - 2026-02-05 + +- Plugin and marketplace names support uppercase letters +- `/experimental` shows help screen listing experimental features +- Fix SQL tool disconnects +- Plugins can bundle LSP server configurations + ## 0.0.404 - 2026-02-05 - Add support for claude-opus-4.6 model From 8218a021346fb655cd88e13c60d7e92f0f4c33fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 7 Feb 2026 19:10:26 +0000 Subject: [PATCH 11/17] Update changelog.md for version 0.0.406 --- changelog.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/changelog.md b/changelog.md index 6d91cb15..0e92efed 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,16 @@ +## 0.0.406 - 2026-02-07 + +- Add support for Claude Opus 4.6 Fast (Preview) +- Markdown formatting displays in non-interactive mode output +- Display warning when user has no Copilot subscription +- Commands from plugins are now translated into skills +- Add `/changelog` command to view release notes +- plugin marketplace add accepts URLs as sources +- `--no-experimental` flag disables experimental features +- CLI interface renders without extra blank line +- `/mcp show` displays enabled/disabled status for MCP tools +- MCP tool responses now include structured content (images, resources) for richer UI display in VS Code + ## 0.0.405 - 2026-02-05 - Plugin and marketplace names support uppercase letters From 2e925bf7e568c771ea1b1371c9f9486e91ece977 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Feb 2026 20:16:31 +0000 Subject: [PATCH 12/17] Update changelog.md for version 0.0.407 --- changelog.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/changelog.md b/changelog.md index 0e92efed..b347cebe 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,42 @@ +## 0.0.407 - 2026-02-11 + +- Improve authentication error messages in prompt mode +- Quota exceeded error links to Copilot settings with actionable guidance +- Theme picker shows live preview of diffs and markdown, adds colorblind and tritanopia theme variants +- Add `/on-air` mode to hide model names and quota details for streaming +- Show agent type and description in read_agent timeline entries +- `/tasks` shows Recent Activity for background agents +- Add experimental alternate screen buffer mode: --alt-screen +- Interactive programs that query terminal state work in shell +- Subagents fall back to session model when default model blocked by policy +- Expose session context in session.list SDK response +- Keyboard shortcut hints display consistently with bold styling throughout the CLI +- Add `tools.list` RPC to query available built-in tools +- Streaming responses automatically retry when interrupted by server errors +- Add option to approve tool permissions permanently for a location +- Add `/instructions` command to view and toggle custom instruction files +- Ctrl-b and ctrl-f cursor movement now available on all platforms +- Ctrl+d now favors deleting character after cursor, with queueing moved to ctrl+q (or ctrl+enter) +- Editing MCP servers shows existing configuration values +- `--resume` creates new sessions with provided UUID +- Add workspace-local MCP configuration via `.vscode/mcp.json` +- Skill changes from `/skills` commands take effect immediately +- /session usage string only shows available subcommands +- Slash commands which take prompts now work when immediately followed by a new-line +- Remove unintended characters from status bar +- Autopilot mode works with custom agents that specify explicit tools +- Updated node-pty to fix file descriptor leaks +- Windows slash flags (e.g., `dir /B`) are no longer treated as file paths +- Diff mode no longer flickers when navigating files +- /mcp disable and /mcp enable show clear error when server name doesn't exist +- MCP servers using Microsoft OAuth configure automatically without manual client ID setup +- Tab cycles modes forward, Shift+Tab backward; shell is now a mode +- Ctrl+P runs slash commands while preserving input (replaces Ctrl+X → /) +- Terminal title works on all TTY terminals, not just select few +- Help text notes auto-update is disabled in CI environments by default +- Terminal tab shows session title when idle +- ask_user tool asks one question at a time for clearer interaction + ## 0.0.406 - 2026-02-07 - Add support for Claude Opus 4.6 Fast (Preview) From 4f22781087f3d0b752df226774596e316030a343 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Feb 2026 12:28:29 +0000 Subject: [PATCH 13/17] Update changelog.md for version 0.0.408 --- changelog.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/changelog.md b/changelog.md index b347cebe..62ded263 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,15 @@ +## 0.0.408 - 2026-02-12 + +- Add `/streamer-mode` to hide preview model names and quota details for streaming +- Makes shellId more flexible to not error when a number is passed +- Background tasks hint updates when detached shells are killed or removed +- Add mouse text selection in --alt-screen mode +- ! commands with large output no longer crash the CLI +- Fix duplicate/ghost lines appearing when resizing the terminal in alt-screen mode +- MCP servers respect the `cwd` working directory property +- Add substring matching to slash command autocomplete +- Change run command shortcut from ctrl+p to ctrl+s + ## 0.0.407 - 2026-02-11 - Improve authentication error messages in prompt mode From 0e73701c398d12e31855d4f3652a372122fefd34 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Feb 2026 22:09:50 +0000 Subject: [PATCH 14/17] Update changelog.md for version 0.0.409 --- changelog.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/changelog.md b/changelog.md index 62ded263..3587b199 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,14 @@ +## 0.0.409 - 2026-02-12 + +- /diff uses full screen in alt-screen mode +- Quick help overlay: press `?` to see grouped shortcuts and commands, navigate with arrow keys +- Theme preview appears above theme list in screen reader mode +- Add `list_copilot_spaces` tool to default GitHub MCP config +- Subagents return complete responses +- CLI now integrates with VS Code, use /ide for more information. +- Permission prompts with long diffs are scrollable in alt-screen mode +- Include default plugin marketplaces (copilot-plugins, awesome-copilot) for easier plugin discovery + ## 0.0.408 - 2026-02-12 - Add `/streamer-mode` to hide preview model names and quota details for streaming From e0ec58f7731e5c84c1f3397d91a2cb7bb6b7bc9b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 14 Feb 2026 00:52:38 +0000 Subject: [PATCH 15/17] Update changelog.md for version 0.0.410 --- changelog.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/changelog.md b/changelog.md index 3587b199..190d74ad 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,31 @@ +## 0.0.410 - 2026-02-14 + +- Fixed high memory usage caused by rapid logging +- Shell mode pastes raw text instead of paste tokens +- Reduce memory usage from encoding streaming chunks +- Fix alt-screen and timeline URL rendering to preserve long links without truncation +- Reduced memory growth in long sessions by evicting transient events after compaction +- Fixed high memory usage when loading large sessions +- Fixed high memory usage during shell commands with rapid output +- Add `/init suppress` to control init suggestions per repository +- Show IDE file selection indicator in the status bar when connected to an IDE +- Add repo-level settings to disable individual validation tools +- ACP server supports loading existing sessions +- Page Up/Page Down keyboard scrolling in alt-screen mode +- Add Ctrl+Z suspend/resume support on Unix platforms +- Support tilde (~) expansion in MCP server cwd configuration +- Support ctrl+n and ctrl+p as arrow key alternatives +- Exit CLI with ctrl+d on empty prompt +- Fix unknown option '--no-warnings' error +- Shift+Enter inserts newlines in terminals with kitty keyboard protocol +- MCP server list selection adjusts correctly after deletion +- Shell mode removed from Shift+Tab cycle, accessed only via `!` +- Improve /tasks dialog with consistent icons and typography +- Exit from alt-screen no longer replays full session history +- MCP server errors and loading issues surface in timeline +- Reduce input jitter with frame coalescing and smoother alt-screen animations +- Extend skill name validation to support underscores, dots, and spaces; make name and description optional in skill frontmatter with sensible fallbacks + ## 0.0.409 - 2026-02-12 - /diff uses full screen in alt-screen mode From 8d7e4679ec3a643ea8b93679f8123115f60d9816 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 17 Feb 2026 13:58:51 +0000 Subject: [PATCH 16/17] Add PowerShell dependency to winget manifests Modify the winget workflow to inject a PowerShell >= 7.0.0 dependency into the installer manifest before submission. This ensures users have PowerShell 7+ installed when installing via winget. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/winget.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml index 094defe6..a8db411f 100644 --- a/.github/workflows/winget.yml +++ b/.github/workflows/winget.yml @@ -41,4 +41,20 @@ jobs: .\wingetcreate.exe update $packageId ` --version $packageVersion ` --urls "$installerUrlx64|x64" "$installerUrlarm64|arm64" ` - --submit + --out manifests + + # Add PowerShell dependency to installer manifest + $installerManifest = Get-ChildItem -Path manifests -Filter "*.installer.yaml" -Recurse | Select-Object -First 1 + $content = Get-Content $installerManifest -Raw + $dependency = @" +Dependencies: + PackageDependencies: + - PackageIdentifier: Microsoft.PowerShell + MinimumVersion: "7.0.0" +"@ + # Insert dependency block before the Installers section + $content = $content -replace '(?m)^Installers:', "$dependency`nInstallers:" + Set-Content -Path $installerManifest -Value $content -NoNewline + + # Submit the modified manifest + .\wingetcreate.exe submit manifests From d1623992583be4090ebb9711210718753b3ffc4c Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 17 Feb 2026 14:04:07 +0000 Subject: [PATCH 17/17] Address CR feedback: add error handling and fix newline - Add check for missing installer manifest with error message - Remove -NoNewline to preserve YAML file conventions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/winget.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml index a8db411f..acb0ad68 100644 --- a/.github/workflows/winget.yml +++ b/.github/workflows/winget.yml @@ -44,8 +44,12 @@ jobs: --out manifests # Add PowerShell dependency to installer manifest - $installerManifest = Get-ChildItem -Path manifests -Filter "*.installer.yaml" -Recurse | Select-Object -First 1 - $content = Get-Content $installerManifest -Raw + $installerManifest = Get-ChildItem -Path manifests -Filter "*.installer.yaml" -Recurse | Select-Object -First 1 -ExpandProperty FullName + if (-not $installerManifest) { + Write-Error "No installer manifest (*.installer.yaml) was found in the 'manifests' directory." + exit 1 + } + $content = Get-Content -Path $installerManifest -Raw $dependency = @" Dependencies: PackageDependencies: @@ -54,7 +58,7 @@ Dependencies: "@ # Insert dependency block before the Installers section $content = $content -replace '(?m)^Installers:', "$dependency`nInstallers:" - Set-Content -Path $installerManifest -Value $content -NoNewline + Set-Content -Path $installerManifest -Value $content # Submit the modified manifest .\wingetcreate.exe submit manifests