Repository navigation
Conversation
…mmand Passing shell-unquoted path strings to SysCommand caused shlex.split() to split mountpoints containing spaces (e.g. '/mnt/Cleartext Storage') into separate arguments, breaking 'btrfs subvolume list' and 'mount'. Pass argv lists to SysCommand for btrfs subvolume, chattr, and mount invocations, parse btrfs subvolume list lines using ' path ' so subvolume names with spaces are preserved, and add unit tests. Fixes archlinux#4879
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4879.
When a pre-mounted filesystem has a mountpoint containing spaces (such as
/mnt/Cleartext Storage), passing an interpolated command string likef'btrfs subvolume list {mountpoint}'or' '.join(cmd)toSysCommandcausedshlex.split()to break the path into multiple arguments:Changes
archinstall/lib/disk/device_handler.py:SysCommandforbtrfs subvolume list,btrfs subvolume create, andchattr.btrfs subvolume listoutput usingline.split(' path ', maxsplit=1)[-1]so subvolume names containing spaces are not truncated.archinstall/lib/disk/utils.py:cmdlist directly toSysCommand(cmd)inmount()instead of joining it with spaces first.tests/test_disk_mountpoints.py:DeviceHandler.get_btrfs_info()andmount()with spaces in mountpoint paths.