You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a program that takes a string as a positional argument (e.g. the one below).
Run command -- --
Expected: The program receives -- as the string for the positional arg.
Observed: The program swallows an extra --. You have to call command -- -- -- to get -- as the positional arg.
Example program:
import{binary,stringascmdString,command,positional,run}from"cmd-ts";constapp=command({name: "my-command",args: {text: positional({type: cmdString,displayName: "Text"}),},handler: async({ text })=>{console.log(text);},});run(binary(app),process.argv);
The text was updated successfully, but these errors were encountered:
command -- --
Expected: The program receives
--
as the string for the positional arg.Observed: The program swallows an extra
--
. You have to callcommand -- -- --
to get--
as the positional arg.Example program:
The text was updated successfully, but these errors were encountered: