fix: more explicit CLI error (#3049)

This commit is contained in:
Guillaume Bouvignies
2024-01-21 21:04:33 +01:00
committed by GitHub
parent 2f15b62ca9
commit 96b28987de
+3 -4
View File
@@ -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("<path:string>")
.arguments("<path_to_script_file:string>")
.option("--lock-only", "re-generate only the lock")
.option("--schema-only", "re-generate only script schema")
.action(generateMetadata as any);