Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
03b4f2bf
Unverified
Commit
03b4f2bf
authored
Mar 17, 2022
by
Jesús S Guerrero
Committed by
GitHub
Mar 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] process exception during linux_doctor is handled (#100159)
parent
b39a9473
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
linux_doctor.dart
packages/flutter_tools/lib/src/linux/linux_doctor.dart
+2
-0
linux_doctor_test.dart
...ter_tools/test/general.shard/linux/linux_doctor_test.dart
+10
-1
No files found.
packages/flutter_tools/lib/src/linux/linux_doctor.dart
View file @
03b4f2bf
...
...
@@ -169,6 +169,8 @@ class LinuxDoctorValidator extends DoctorValidator {
]);
}
on
ArgumentError
{
// ignore error.
}
on
ProcessException
{
// ignore error.
}
if
(
result
==
null
||
result
.
exitCode
!=
0
)
{
return
null
;
...
...
packages/flutter_tools/test/general.shard/linux/linux_doctor_test.dart
View file @
03b4f2bf
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/user_messages.dart'
;
import
'package:flutter_tools/src/doctor_validator.dart'
;
import
'package:flutter_tools/src/linux/linux_doctor.dart'
;
...
...
@@ -90,6 +91,14 @@ FakeCommand _missingBinaryCommand(String binary) {
);
}
FakeCommand
_missingBinaryException
(
String
binary
)
{
return
FakeCommand
(
command:
<
String
>[
binary
,
'--version'
],
exitCode:
1
,
exception:
ProcessException
(
binary
,
<
String
>[])
);
}
void
main
(
)
{
testWithoutContext
(
'Full validation when everything is available at the necessary version'
,()
async
{
final
ProcessManager
processManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
...
...
@@ -260,7 +269,7 @@ void main() {
testWithoutContext
(
'Missing validation when clang++ is not available'
,
()
async
{
final
ProcessManager
processManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
_missingBinary
Command
(
'clang++'
),
_missingBinary
Exception
(
'clang++'
),
_cmakePresentCommand
(
'3.16.3'
),
_ninjaPresentCommand
(
'1.10.0'
),
_pkgConfigPresentCommand
(
'0.29'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment