Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FrameworkBundle] Prevent silenced warning by checking if /proc/mount exists #53785

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -49,9 +49,6 @@ public function __construct(CacheClearerInterface $cacheClearer, ?Filesystem $fi
$this->filesystem = $filesystem ?? new Filesystem();
}

/**
* {@inheritdoc}
*/
protected function configure()
{
$this
Expand All @@ -71,9 +68,6 @@ protected function configure()
;
}

/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
$fs = $this->filesystem;
Expand Down Expand Up @@ -208,7 +202,7 @@ private function isNfs(string $dir): bool

if (null === $mounts) {
$mounts = [];
if ('/' === \DIRECTORY_SEPARATOR && $files = @file('/proc/mounts')) {
if ('/' === \DIRECTORY_SEPARATOR && is_readable('/proc/mounts') && $files = @file('/proc/mounts')) {
foreach ($files as $mount) {
$mount = \array_slice(explode(' ', $mount), 1, -3);
if (!\in_array(array_pop($mount), ['vboxsf', 'nfs'])) {
Expand Down