Skip to content

Commit

Permalink
fix: improve filename of packed client
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalygashkov committed Dec 13, 2024
1 parent 25896e5 commit defcb4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cli/commands/client/pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export const pack = async (
const client = await importClient(input);
const ext = format || (output ? extname(output) : 'azot');
const data = await client.pack(ext as 'wvd' | 'azot' | undefined);
const filename = `${client.info.get('company_name')}-${client.info.get('model_name')?.toLowerCase()}`;
const filename =
`${client.info.get('company_name')}-${client.info.get('model_name')}`
.replaceAll(' ', '-')
.toLowerCase();
const outputPath = output || join(process.cwd(), `${filename}.${ext}`);
await writeFile(outputPath, data);
console.log(`Client packed: ${outputPath}`);
Expand Down

0 comments on commit defcb4d

Please sign in to comment.