Skip to content

Commit

Permalink
fix: race condition in dry run results in an empty output
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Oct 8, 2018
1 parent 98f6cdd commit 532ab8a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libs/utils/src/lib/command-runner.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Apollo } from 'apollo-angular';
import { DocumentNode } from 'graphql';
import gql from 'graphql-tag';
import { BehaviorSubject, interval, Observable, of } from 'rxjs';
import { concatMap, last, map, takeWhile } from 'rxjs/operators';
import { concatMap, map, takeWhile } from 'rxjs/operators';

export interface CommandOutput {
status: 'success' | 'failure' | 'inprogress';
Expand Down Expand Up @@ -59,8 +59,7 @@ export class CommandRunner {
return of(r);
}
}),
takeWhile(r => r),
dryRun ? last() : map(r => r)
takeWhile(r => !!r)
);
})
);
Expand Down

0 comments on commit 532ab8a

Please sign in to comment.