From 96b28987ded9f408c1889181982b4d41da4045a2 Mon Sep 17 00:00:00 2001 From: Guillaume Bouvignies Date: Sun, 21 Jan 2024 21:04:33 +0100 Subject: [PATCH] fix: more explicit CLI error (#3049) --- cli/script.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cli/script.ts b/cli/script.ts index 6c8e265ce6..6c2633dddc 100644 --- a/cli/script.ts +++ b/cli/script.ts @@ -897,8 +897,6 @@ async function generateMetadata( const workspace = await resolveWorkspace(opts); await requireLogin(opts); - const language = inferContentTypeFromFilePath(scriptPath); - // read script metadata file const remotePath = scriptPath .substring(0, scriptPath.indexOf(".")) @@ -915,7 +913,8 @@ async function generateMetadata( string, any >; - + + const language = inferContentTypeFromFilePath(scriptPath); if (!opts.lockOnly) { await updateScriptSchema( scriptContent, @@ -1042,7 +1041,7 @@ const command = new Command() "generate-metadata", "re-generate the metadata file updating the lock and the script schema" ) - .arguments("") + .arguments("") .option("--lock-only", "re-generate only the lock") .option("--schema-only", "re-generate only script schema") .action(generateMetadata as any);