Skip to content

Commit 89d72ba

Browse files
committed
fix: Resolve the issue where the upgrade prompt indicates the disk
is full During apt installation, disk space might be freed up; ignore prompts to free up space.
1 parent ce394c2 commit 89d72ba

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/internal/system/system_apt.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ func parsePackageSize(line string) (float64, float64, error) {
441441
var __InstallAddSize__ = regexp.MustCompile("After this operation, ([0-9,.]+) ([kMGTPEZY]?)B")
442442

443443
func parseInstallAddSize(line string) (float64, error) {
444+
// For example, line is "After this operation, 200GB disk space will be freed."
445+
if strings.Contains(line, "freed") {
446+
return 0, nil
447+
}
444448
ms := __InstallAddSize__.FindSubmatch(([]byte)(line))
445449
switch len(ms) {
446450
case 3:

0 commit comments

Comments
 (0)