From 685ec29573529dc31763e449eadfc0160d92e7a7 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 17 Dec 2022 23:50:47 +0100 Subject: [PATCH] Increase disk size warning to 100MB minimum, closes #11190 --- src/Composer/Console/Application.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 54353fa38..20c7e3762 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -441,12 +441,12 @@ class Application extends BaseApplication if (null !== $composer && function_exists('disk_free_space')) { $config = $composer->getConfig(); - $minSpaceFree = 1024 * 1024; + $minSpaceFree = 100 * 1024 * 1024; if ((($df = disk_free_space($dir = $config->get('home'))) !== false && $df < $minSpaceFree) || (($df = disk_free_space($dir = $config->get('vendor-dir'))) !== false && $df < $minSpaceFree) || (($df = disk_free_space($dir = sys_get_temp_dir())) !== false && $df < $minSpaceFree) ) { - $io->writeError('The disk hosting '.$dir.' is full, this may be the cause of the following exception', true, IOInterface::QUIET); + $io->writeError('The disk hosting '.$dir.' has less than 100MiB of free space, this may be the cause of the following exception', true, IOInterface::QUIET); } } } catch (\Exception $e) {