File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ import 'package:logger/logger.dart';
55final logger = Logger (
66 level: Level .all,
77 filter: ProductionFilter (),
8- printer: PrettyPrinter (
8+ printer: stdout.hasTerminal ? PrettyPrinter (
99 methodCount: 0 ,
1010 excludeBox: {
1111 Level .trace: true
1212 },
1313 colors: stdout.supportsAnsiEscapes,
1414 lineLength: stdout.terminalColumns,
15- ),
15+ ) : SimplePrinter () ,
1616);
Original file line number Diff line number Diff line change @@ -35,11 +35,18 @@ void main() {
3535 // arrange
3636 final path = "/path/to/folder" ;
3737 final branch = "selected_branch" ;
38- final branches = [ '' , branch] ;
38+ bool firstExec = true ;
3939
4040 when (() => mockAppConfig.gitRepoPath).thenReturn (path);
4141 when (() => mockAppConfig.gitBranch).thenAnswer (
42- (_) => isBranchDefined ? branch : branches.removeAt (0 ),
42+ (_) {
43+ if (isBranchDefined) return branch;
44+ if (firstExec) {
45+ firstExec = false ;
46+ return '' ;
47+ }
48+ return branch;
49+ },
4350 );
4451 when (() => mockAppConfig.gitForceRemote).thenReturn (gitForceRemote);
4552 when (() => mockAppConfig.gitSSLEnabled).thenReturn (true );
You can’t perform that action at this time.
0 commit comments