Skip to content

Commit

Permalink
fix: wrapping command for fvm
Browse files Browse the repository at this point in the history
  • Loading branch information
toonvanstrijp authored Jan 31, 2024
1 parent 2eab4ab commit a9a33b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions openapi-generator/lib/src/models/command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ class Command {
required String executable,
required List<String> arguments,
}) : this._(
executable == 'dart' || wrapper == Wrapper.none
wrapper == Wrapper.none
? executable
: wrapper == Wrapper.flutterw
? './flutterw'
: 'fvm',
arguments,
[
if (wrapper == Wrapper.fvm) executable,
...arguments,
],
);
}
4 changes: 2 additions & 2 deletions openapi-generator/test/command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ void main() {
expect(command.arguments, testArgs);
expect(command.executable, './flutterw');
});
test('Wrapper.fvw', () {
test('Wrapper.fvm', () {
final command = Command(
executable: 'flutter', arguments: testArgs, wrapper: Wrapper.fvm);
expect(command.arguments, testArgs);
expect(command.arguments, ['flutter', ...testArgs]);
expect(command.executable, 'fvm');
});
test('doesn\'t wrap Wrapper.none', () {
Expand Down

0 comments on commit a9a33b0

Please sign in to comment.