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
1884920e
Unverified
Commit
1884920e
authored
Aug 17, 2020
by
Zachary Anderson
Committed by
GitHub
Aug 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tool] Handle Windows line endings in packages_test.dart (#63806)
parent
579cab8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
packages_test.dart
...er_tools/test/commands.shard/permeable/packages_test.dart
+9
-4
No files found.
packages/flutter_tools/test/commands.shard/permeable/packages_test.dart
View file @
1884920e
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:async'
;
import
'dart:convert'
;
import
'package:args/command_runner.dart'
;
import
'package:args/command_runner.dart'
;
import
'package:flutter_tools/src/base/bot_detector.dart'
;
import
'package:flutter_tools/src/base/bot_detector.dart'
;
...
@@ -37,10 +38,14 @@ void main() {
...
@@ -37,10 +38,14 @@ void main() {
final
String
projectPath
=
await
createProject
(
tempDir
,
arguments:
arguments
);
final
String
projectPath
=
await
createProject
(
tempDir
,
arguments:
arguments
);
final
File
pubspec
=
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
projectPath
,
'pubspec.yaml'
));
final
File
pubspec
=
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
projectPath
,
'pubspec.yaml'
));
String
content
=
await
pubspec
.
readAsString
();
String
content
=
await
pubspec
.
readAsString
();
content
=
content
.
replaceFirst
(
final
List
<
String
>
contentLines
=
LineSplitter
.
split
(
content
).
toList
();
'
\n
dependencies:
\n
'
,
final
int
depsIndex
=
contentLines
.
indexOf
(
'dependencies:'
);
'
\n
dependencies:
\n
$plugin
:
\n
'
,
expect
(
depsIndex
,
isNot
(-
1
));
);
contentLines
.
replaceRange
(
depsIndex
,
depsIndex
+
1
,
<
String
>[
'dependencies:'
,
'
$plugin
:'
,
]);
content
=
contentLines
.
join
(
'
\n
'
);
await
pubspec
.
writeAsString
(
content
,
flush:
true
);
await
pubspec
.
writeAsString
(
content
,
flush:
true
);
return
projectPath
;
return
projectPath
;
}
}
...
...
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