You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
YOLO mode file mount fails (--add-dir "Not a directory") #139
When a mount's host path is a file rather than a directory (e.g. copilot_here --yolo --mount /.copilot/mcp-config.json:/.copilot/mcp-config.json:rw , or the equivalent saved via copilot_here mount ), YOLO mode still passes it to copilot --add-dir :
// app/Commands/Run/RunCommand.cs (~line 605-617)
foreach (var mount in allMounts)
{
toolCommand.Add("--add-dir");
toolCommand.Add(mount.GetContainerPath(ctx.Paths.UserHome));
}
MountEntry ( app/Commands/Mounts/_MountsConfig.cs ) has no file/directory distinction, so this always fires regardless of mount type. copilot 's CLI now enforces --add-dir must be a directory, so it fails with (since a few days):
error: option '--add-dir ' argument '/home/appuser/.copilot/mcp-config.json' is invalid. Not a directory: /home/appuser/.copilot/mcp-config.json
This used to work until a few days ago (probaly copilot update does not allow to pass file with "--add-dir" anymore)
Expected: File mounts work in YOLO mode. This matters for injecting single config files (e.g. shared MCP config into ~/.copilot/mcp-config.json ) without mounting/sharing the whole ~/.copilot directory, which also holds session/auth/settings state the CLI writes to implicitly.
Workaround: copy files to be mounted to ~/.config/copilot-cli-docker/ , I guess the folder name depends on whether you enabled docker in your copilot_here instance or not.
Activity