scripting: Disable an eslint warning
Calling await in a loop means the asynchronous operations are run sequentially instead of in-parallel. Usually that's not what's wanted, so eslint has a rule to warn about this. However here we use async/await to handle control back to the mainloop between steps, so running operations sequentially is actually intended. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
This commit is contained in:
parent
1a32e3e74a
commit
e585f7d97b
@ -317,7 +317,7 @@ async function runPerfScript(scriptModule, outputFile) {
|
||||
|
||||
for (let step of scriptModule.run()) {
|
||||
try {
|
||||
await step;
|
||||
await step; // eslint-disable-line no-await-in-loop
|
||||
} catch (err) {
|
||||
log(`Script failed: ${err}\n${err.stack}`);
|
||||
Meta.exit(Meta.ExitCode.ERROR);
|
||||
|
Loading…
Reference in New Issue
Block a user