mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[partition] Fix up tests
- Although we long ago replaced the getPartitions implementation, the test is still there, and on a machine with no /dev/sda (e.g. because root is on nvme) the echo-awk-shell-pipeline can give an empty string; this is turned into a QStringList{""} which has one element, while the new version has 0 elements. - Special-case the test that empty strings should be empty lists, rather than 1-element lists with an empty element.
This commit is contained in:
parent
a0b4b2bf5e
commit
f8df49e40f
1 changed files with 5 additions and 1 deletions
|
@ -42,7 +42,11 @@ getPartitionsForDevice_other(const QString& deviceName)
|
|||
process.start();
|
||||
process.waitForFinished();
|
||||
|
||||
const QString partitions = process.readAllStandardOutput();
|
||||
const QString partitions = process.readAllStandardOutput().trimmed();
|
||||
if ( partitions.isEmpty() )
|
||||
{
|
||||
return QStringList();
|
||||
}
|
||||
const QStringList partitionsList = partitions.simplified().split( ' ' );
|
||||
|
||||
return partitionsList;
|
||||
|
|
Loading…
Add table
Reference in a new issue