Skip to content

Commit

Permalink
Merge pull request #7 from denz93/fix-error-file-not-found
Browse files Browse the repository at this point in the history
[https://github.com/tmizuma/openapi-test-data-generator/issues/6]fix error file not found when run under spacing-contain directory
  • Loading branch information
tmizuma authored Oct 22, 2023
2 parents 9490960 + 0fcc014 commit 8c3f8fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/generate/utils/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs';
import yaml from 'js-yaml';

export const parse = (fullPath) => {
const yamlText = fs.readFileSync(fullPath.replaceAll(' ', ''), 'utf8');
const yamlText = fs.readFileSync(fullPath.trim(), 'utf8');
return yaml.load(yamlText);
};

Expand Down

0 comments on commit 8c3f8fd

Please sign in to comment.