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);