Skip to content

desk: .wslconfig value parsing differs from WSL (repeated keys, trailing comments, line continuation) #387

Closed

Description

@scuttletoby

Follow-ups from the re-check of #354 (comment #354 (comment)). All are older than #354; start-desk.ps1 reads .wslconfig differently from WSL's own parser (configfile.cpp) in these cases:

  1. Repeated keys: the script takes the last value, WSL the first. A memory cap raised by hand can be lowered.
  2. # comment after a value: memory=20GB # raised is treated as unreadable and replaced with the default.
  3. A value line ending in \: WSL joins the next line onto it, so a key on that line can be swallowed without anyone noticing.

Each needs a test row that matches WSL's parser (the re-check ported it to Python and fuzzed it; reuse that approach). Fail-closed: when unsure, refuse and say why, never overwrite a value the owner set.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions