Skip to content

disallow setting a negative indentation level in to xml - #19292

Merged
fdncred merged 1 commit into
nushell:mainfrom
ymcx:fix-to-xml-negative-indentation
Oct 18, 2026
Merged

fdncred merged 1 commit into
nushell:mainfrom
ymcx:fix-to-xml-negative-indentation

Conversation

@ymcx

@ymcx ymcx commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Description

to xml allows setting a negative value for the indent argument, even though none of the other to commands with similar arguments allow doing so. Giving a value of -1 makes it warp into usize::MAX, which makes Nushell freeze regardless of the input.

User-facing changes (Release notes)

to xml now disallows setting a negative indentation amount.

Additional notes

Closes #19291

@fdncred fdncred added notes:fixes Noted in "Bug fixes" section notes:ready Indicates Ready for Release notes labels Oct 18, 2026
@fdncred
fdncred merged commit a4e1065 into nushell:main Oct 18, 2026
12 checks passed
@fdncred

fdncred commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Thanks

@github-actions github-actions Bot added this to the v0.117.0 milestone Oct 18, 2026
@ymcx
ymcx deleted the fix-to-xml-negative-indentation branch November 14, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:fixes Noted in "Bug fixes" section notes:ready Indicates Ready for Release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

to xml accepts negative indentation levels

2 participants