From 45cce6c3819b60d656db0f7fafbed0d567b8f274 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Tue, 16 May 2023 15:23:07 +0200 Subject: [PATCH] api: Pass on the script name to the API. (#3845) --- bin/sitespeed.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/sitespeed.js b/bin/sitespeed.js index feda176f1..a2d708c03 100755 --- a/bin/sitespeed.js +++ b/bin/sitespeed.js @@ -5,7 +5,7 @@ import { writeFileSync } from 'node:fs'; import { execSync } from 'node:child_process'; import { platform } from 'node:os'; -import { resolve } from 'node:path'; +import { resolve, basename } from 'node:path'; import { readFileSync } from 'node:fs'; import merge from 'lodash.merge'; @@ -36,6 +36,7 @@ async function api(options) { new URL(resolve(process.cwd(), options._[0]), import.meta.url) ); apiOptions.api.scripting = scripting.toString(); + apiOptions.api.scriptingName = basename(options._[0]); } if (apiOptions.mobile) {