mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
flutter: do not log /etc/os-release read error
Apps using flutter may fail to build with this error: Failed obtaining PRETTY_NAME for Linux: PathNotFoundException: Cannot open file, path = '/usr/lib/os-release' (OS Error: No such file or directory, errno = 2) Nix build sandbox doesn't have /usr/lib/os-release and /etc/os-release files.
This commit is contained in:
parent
5f76d33fec
commit
32813062aa
1 changed files with 12 additions and 0 deletions
|
@ -0,0 +1,12 @@
|
|||
diff --git a/packages/flutter_tools/lib/src/base/os.dart b/packages/flutter_tools/lib/src/base/os.dart
|
||||
index 9134a014f8d..0410f328c66 100644
|
||||
--- a/packages/flutter_tools/lib/src/base/os.dart
|
||||
+++ b/packages/flutter_tools/lib/src/base/os.dart
|
||||
@@ -316,7 +316,6 @@ class _LinuxUtils extends _PosixUtils {
|
||||
final String osRelease = _fileSystem.file(osReleasePath).readAsStringSync();
|
||||
prettyName = _getOsReleaseValueForKey(osRelease, prettyNameKey);
|
||||
} on Exception catch (e) {
|
||||
- _logger.printTrace('Failed obtaining PRETTY_NAME for Linux: $e');
|
||||
prettyName = '';
|
||||
}
|
||||
try {
|
Loading…
Add table
Add a link
Reference in a new issue