Skip to content

Commit

Permalink
fix: create temporary file with .yml extension
Browse files Browse the repository at this point in the history
The change in [1] makes file extensions mandatory.

1. 15ed666
  • Loading branch information
hassy committed Dec 16, 2024
1 parent 4cb6d20 commit 557a5ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/artillery/lib/cmds/quick.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class QuickCommand extends Command {
script.scenarios[0].engine = 'ws';
}

const tmpf = tmp.fileSync();
fs.writeFileSync(tmpf.name, JSON.stringify(script, null, 2), { flag: 'w' });
const tmpf = `${tmp.fileSync().name}.yml`;
fs.writeFileSync(tmpf, JSON.stringify(script, null, 2), { flag: 'w' });

const runArgs = [];
if (flags.output) {
Expand All @@ -82,7 +82,7 @@ class QuickCommand extends Command {
runArgs.push('--quiet');
}

runArgs.push(`${tmpf.name}`);
runArgs.push(tmpf);

RunCommand.run(runArgs);
}
Expand Down

0 comments on commit 557a5ec

Please sign in to comment.