windmill-labs/windmill · error
Invalid settings format. Expected include_path array
Error message
Invalid settings format. Expected include_path array
What it means
Schema validation of --with-backend-settings in the git-sync settings push command: the flag's JSON parsed but include_path is missing or not an array. The push path expects the same raw backend settings object shape as pull; the input at fault is the hand-supplied JSON string whose include_path is absent or not an array.
Source
Thrown at cli/src/commands/gitsync-settings/push.ts:75
);
process.exit(1);
}
// Read local configuration
const localConfig = await readConfigFile();
// Parse and validate --with-backend-settings if provided, otherwise fetch from backend
let settings: any;
if (opts.withBackendSettings) {
try {
const parsedSettings = JSON.parse(opts.withBackendSettings);
// Validate the structure matches expected test format (raw settings object)
if (
!parsedSettings.include_path ||
!Array.isArray(parsedSettings.include_path)
) {
throw new Error(
"Invalid settings format. Expected include_path array",
);
}
if (
!parsedSettings.include_type ||
!Array.isArray(parsedSettings.include_type)
) {
throw new Error(
"Invalid settings format. Expected include_type array",
);
}
// Create mock backend response with single repository using provided settings
const mockRepositoryPath = opts.repository || "u/mock/repo";
settings = {
git_sync: {
repositories: [{
git_repo_resource_path: mockRepositoryPath,View on GitHub (pinned to e474e8803c)
Solutions
- Fix the JSON so include_path is an array of path patterns
- Reuse an object previously fetched from the backend's git-sync settings endpoint
- Omit the flag and let push read the local config / backend settings instead
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/gitsync-settings/push.ts:75 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/db3f019badd8b40a.
Report an issue: GitHub.