mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-09 20:57:44 +00:00
fix: join command crash (#367)
* fix: resolve $ref and inline it into the resulting definition * chore: tests updates
This commit is contained in:
committed by
GitHub
parent
7f213f5ed3
commit
b53e9e4acb
@@ -135,7 +135,13 @@ export function readYaml(filename: string) {
|
||||
}
|
||||
|
||||
export function writeYaml(data: any, filename: string, noRefs = false) {
|
||||
return fs.writeFileSync(filename, yaml.safeDump(data, { noRefs }));
|
||||
const content = yaml.safeDump(data, { noRefs });
|
||||
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
process.stderr.write(content);
|
||||
return;
|
||||
}
|
||||
fs.writeFileSync(filename, content);
|
||||
}
|
||||
|
||||
export function pluralize(label: string, num: number) {
|
||||
|
||||
Reference in New Issue
Block a user