Skip to content

Commit fb353f0

Browse files
committed
Revert dartfmt changes
1 parent 06ed47b commit fb353f0

File tree

2 files changed

+33
-16
lines changed

2 files changed

+33
-16
lines changed

lib/src/command/run.dart

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ class RunCommand extends PubCommand {
2222
bool get allowTrailingOptions => false;
2323

2424
RunCommand() {
25-
argParser.addFlag("checked",
26-
abbr: "c", help: "Enable runtime type checks and assertions.");
27-
argParser.addFlag('list',
28-
help: 'List all available executables.', negatable: false);
25+
argParser.addFlag("checked", abbr: "c",
26+
help: "Enable runtime type checks and assertions.");
27+
argParser.addFlag('list', negatable: false,
28+
help: 'List all available executables.');
2929
argParser.addOption("mode",
3030
help: 'Mode to run transformers in.\n'
31-
'(defaults to "release" for dependencies, "debug" for entrypoint)');
31+
'(defaults to "release" for dependencies, "debug" for '
32+
'entrypoint)');
3233
}
3334

3435
Future run() async {
@@ -53,10 +54,10 @@ class RunCommand extends PubCommand {
5354
executable = components[1];
5455

5556
if (p.split(executable).length > 1) {
56-
// TODO(nweiz): Use adjacent strings when the new async/await compiler
57-
// lands.
58-
usageException(
59-
"Cannot run an executable in a subdirectory of a dependency.");
57+
// TODO(nweiz): Use adjacent strings when the new async/await compiler
58+
// lands.
59+
usageException("Cannot run an executable in a subdirectory of a " +
60+
"dependency.");
6061
}
6162
} else if (onlyIdentifierRegExp.hasMatch(executable)) {
6263
// "pub run foo" means the same thing as "pub run foo:foo" as long as

test/run/list_test.dart

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ main() {
1414
d.dir('bin', [
1515
d.file('foo.dart'),
1616
d.file('bar.dart'),
17-
d.dir('sub', [d.file('baz.dart')])
17+
d.dir('sub', [
18+
d.file('baz.dart')
19+
])
1820
])
1921
]).create();
2022

@@ -30,7 +32,10 @@ ${p.join('bin', 'sub', 'baz')}
3032
integration('lists only Dart files', () {
3133
d.dir(appPath, [
3234
d.appPubspec(),
33-
d.dir('bin', [d.file('foo.dart'), d.file('bar.sh')])
35+
d.dir('bin', [
36+
d.file('foo.dart'),
37+
d.file('bar.sh')
38+
])
3439
]).create();
3540

3641
schedulePub(args: ['run', '--list'], output: p.join('bin', 'foo'));
@@ -41,7 +46,9 @@ ${p.join('bin', 'sub', 'baz')}
4146
d.libPubspec('foo', '1.0.0'),
4247
d.dir('bin', [
4348
d.file('bar.dart'),
44-
d.dir('sub', [d.file('baz.dart'),])
49+
d.dir('sub', [
50+
d.file('baz.dart')
51+
])
4552
])
4653
]).create();
4754

@@ -63,14 +70,18 @@ foo:${p.join('sub', 'baz')}
6370
integration('lists executables only from immediate dependencies', () {
6471
d.dir('foo', [
6572
d.libPubspec('foo', '1.0.0'),
66-
d.dir('bin', [d.file('baz.dart')])
73+
d.dir('bin', [
74+
d.file('baz.dart')
75+
])
6776
]).create();
6877

6978
d.dir('bar', [
7079
d.libPubspec('bar', '1.0.0', deps: {
7180
'foo': {'path': '../foo'}
7281
}),
73-
d.dir('bin', [d.file('baz.dart')])
82+
d.dir('bin', [
83+
d.file('baz.dart')
84+
])
7485
]).create();
7586

7687
d.dir(appPath, [
@@ -86,7 +97,10 @@ foo:${p.join('sub', 'baz')}
8697
integration('normilizes executable names', () {
8798
d.dir('foo', [
8899
d.libPubspec('foo', '1.0.0'),
89-
d.dir('bin', [d.file('foo.dart'), d.file('bar.dart')])
100+
d.dir('bin', [
101+
d.file('foo.dart'),
102+
d.file('bar.dart')
103+
])
90104
]).create();
91105

92106
d.dir(appPath, [
@@ -105,7 +119,9 @@ foo:bar
105119
});
106120

107121
integration('prints blank line when no executables found', () {
108-
d.dir(appPath, [d.appPubspec()]).create();
122+
d.dir(appPath, [
123+
d.appPubspec()
124+
]).create();
109125

110126
schedulePub(args: ['run', '--list'], output: '\n');
111127
});

0 commit comments

Comments
 (0)