Skip to content

Commit

Permalink
fix to not to using plain format for windows graphviz #249
Browse files Browse the repository at this point in the history
close #249
  • Loading branch information
kamiazya committed Jan 10, 2021
1 parent 747c70c commit 917e70b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/lib/dot-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ function execCommand(command: string, input: string): Buffer {
});
}

export function dotPlainStdin(input: string): Buffer {
return execCommand('dot -Tplain', input);
export function dotStdin(input: string): Buffer {
return execCommand('dot', input);
}

export function checkValidDot(dot: string): void {
try {
dotPlainStdin(dot);
dotStdin(dot);
} catch (error) {
throw error;
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/is-valid-dot.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { dotPlainStdin } from './dot-adapter';
import { dotStdin } from './dot-adapter';

export function isValidDot(dot: string): jest.CustomMatcherResult {
let pass: boolean;
let message: string = 'expected value to be valid dot format.';
try {
dotPlainStdin(dot);
dotStdin(dot);
pass = true;
} catch (error) {
pass = false;
Expand Down

0 comments on commit 917e70b

Please sign in to comment.