@@ -963,7 +963,8 @@ void main() {
963
963
platform: windowsPlatform,
964
964
);
965
965
966
- const String expectedMessage = 'The flutter tool cannot access the file' ;
966
+ const String expectedMessage = 'Flutter failed to run "foo". The flutter tool cannot access the file or directory.\n '
967
+ 'Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user.' ;
967
968
expect (() async => processManager.start (< String > ['foo' ]),
968
969
throwsToolExit (message: expectedMessage));
969
970
expect (() async => processManager.run (< String > ['foo' ]),
@@ -1021,7 +1022,8 @@ void main() {
1021
1022
platform: linuxPlatform,
1022
1023
);
1023
1024
1024
- const String expectedMessage = 'The flutter tool cannot access the file' ;
1025
+ const String expectedMessage = 'Flutter failed to run "foo".\n '
1026
+ 'Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user.' ;
1025
1027
1026
1028
expect (() async => processManager.start (< String > ['foo' ]),
1027
1029
throwsToolExit (message: expectedMessage));
@@ -1085,7 +1087,8 @@ void main() {
1085
1087
platform: macOSPlatform,
1086
1088
);
1087
1089
1088
- const String expectedMessage = 'The flutter tool cannot access the file' ;
1090
+ const String expectedMessage = 'Flutter failed to run "foo".\n '
1091
+ 'Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user.' ;
1089
1092
1090
1093
expect (() async => processManager.start (< String > ['foo' ]),
1091
1094
throwsToolExit (message: expectedMessage));
@@ -1113,23 +1116,24 @@ void main() {
1113
1116
1114
1117
testWithoutContext ('when bad CPU type' , () async {
1115
1118
final FakeProcessManager fakeProcessManager = FakeProcessManager .list (< FakeCommand > [
1116
- const FakeCommand (command: < String > ['foo' ], exception: ProcessException ('' , < String > [], '' , ebadarch)),
1117
- const FakeCommand (command: < String > ['foo' ], exception: ProcessException ('' , < String > [], '' , ebadarch)),
1118
- const FakeCommand (command: < String > ['foo' ], exception: ProcessException ('' , < String > [], '' , ebadarch)),
1119
+ const FakeCommand (command: < String > ['foo' , '--bar' ], exception: ProcessException ('' , < String > [], '' , ebadarch)),
1120
+ const FakeCommand (command: < String > ['foo' , '--bar' ], exception: ProcessException ('' , < String > [], '' , ebadarch)),
1121
+ const FakeCommand (command: < String > ['foo' , '--bar' ], exception: ProcessException ('' , < String > [], '' , ebadarch)),
1119
1122
]);
1120
1123
1121
1124
final ProcessManager processManager = ErrorHandlingProcessManager (
1122
1125
delegate: fakeProcessManager,
1123
1126
platform: macOSPlatform,
1124
1127
);
1125
1128
1126
- const String expectedMessage = 'Flutter requires the Rosetta translation environment' ;
1129
+ const String expectedMessage = 'Flutter failed to run "foo --bar".\n '
1130
+ 'The binary was built with the incorrect architecture to run on this machine.' ;
1127
1131
1128
- expect (() async => processManager.start (< String > ['foo' ]),
1132
+ expect (() async => processManager.start (< String > ['foo' , '--bar' ]),
1129
1133
throwsToolExit (message: expectedMessage));
1130
- expect (() async => processManager.run (< String > ['foo' ]),
1134
+ expect (() async => processManager.run (< String > ['foo' , '--bar' ]),
1131
1135
throwsToolExit (message: expectedMessage));
1132
- expect (() => processManager.runSync (< String > ['foo' ]),
1136
+ expect (() => processManager.runSync (< String > ['foo' , '--bar' ]),
1133
1137
throwsToolExit (message: expectedMessage));
1134
1138
});
1135
1139
});
0 commit comments