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
5fb2d2ae
Unverified
Commit
5fb2d2ae
authored
Aug 02, 2019
by
Christopher Fujino
Committed by
GitHub
Aug 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
have xcodeSelectPath also catch ArgumentError (#37521)
parent
40c5cc97
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
xcode.dart
packages/flutter_tools/lib/src/macos/xcode.dart
+2
-0
xcode_test.dart
...es/flutter_tools/test/general.shard/macos/xcode_test.dart
+3
-0
No files found.
packages/flutter_tools/lib/src/macos/xcode.dart
View file @
5fb2d2ae
...
...
@@ -26,6 +26,8 @@ class Xcode {
_xcodeSelectPath
=
processManager
.
runSync
(<
String
>[
'/usr/bin/xcode-select'
,
'--print-path'
]).
stdout
.
trim
();
}
on
ProcessException
{
// Ignored, return null below.
}
on
ArgumentError
{
// Ignored, return null below.
}
}
return
_xcodeSelectPath
;
...
...
packages/flutter_tools/test/general.shard/macos/xcode_test.dart
View file @
5fb2d2ae
...
...
@@ -30,6 +30,9 @@ void main() {
when
(
mockProcessManager
.
runSync
(<
String
>[
'/usr/bin/xcode-select'
,
'--print-path'
]))
.
thenThrow
(
const
ProcessException
(
'/usr/bin/xcode-select'
,
<
String
>[
'--print-path'
]));
expect
(
xcode
.
xcodeSelectPath
,
isNull
);
when
(
mockProcessManager
.
runSync
(<
String
>[
'/usr/bin/xcode-select'
,
'--print-path'
]))
.
thenThrow
(
ArgumentError
(
'Invalid argument(s): Cannot find executable for /usr/bin/xcode-select'
));
expect
(
xcode
.
xcodeSelectPath
,
isNull
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
mockProcessManager
,
});
...
...
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