Skip to content

Fix YAML ScannerError on Windows credentials_path#30

Open
JesseLeeStringer wants to merge 1 commit intokLOsk:mainfrom
JesseLeeStringer:fix/windows-credentials-path-yaml-escape
Open

Fix YAML ScannerError on Windows credentials_path#30
JesseLeeStringer wants to merge 1 commit intokLOsk:mainfrom
JesseLeeStringer:fix/windows-credentials-path-yaml-escape

Conversation

@JesseLeeStringer
Copy link
Copy Markdown

adloop init writes Windows paths like c:\Users\user\.adloop\credentials.json inside double-quoted YAML, which the parser treats as escape sequences (\U begins a Unicode escape). Loading the resulting config raises ScannerError and the MCP server fails to start.

Switch to single-quoted YAML for credentials_path; single-quoted strings are literal so backslashes are safe. Embedded single quotes are escaped by doubling per the YAML 1.1 spec. Adds tests/test_cli.py covering the Windows path, POSIX path, embedded-apostrophe, and no-credentials-path cases.

`adloop init` writes Windows paths like `c:\Users\user\.adloop\credentials.json`
inside double-quoted YAML, which the parser treats as escape sequences
(`\U` begins a Unicode escape). Loading the resulting config raises
ScannerError and the MCP server fails to start.

Switch to single-quoted YAML for credentials_path; single-quoted strings
are literal so backslashes are safe. Embedded single quotes are escaped
by doubling per the YAML 1.1 spec. Adds tests/test_cli.py covering the
Windows path, POSIX path, embedded-apostrophe, and no-credentials-path cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant