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
I realize this probably not supported, but I figured I'll just ask, the idea is that if I have bin program that accepts check and update, and I want to run one of these commands by default if I didn't pass one of them so bin argument invokes bin update argument for example
import{Command}from"https://deno.land/x/[email protected]/command/mod.ts";constcheckCommand=newCommand();constupdateCommand=newCommand();constmain=newCommand().name("bin").action(function(){// this will not be reached// becuase cliffy validation will catch the command passed as unkown// so bin hello errors before reaching hereif(Deno.args.length!==0){// run checkCommand();}else{// this works// bin -> shows helpthis.showHelp();}}).command("check",checkCommand).command("update",updateCommand);awaitmain.parse(Deno.args);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I realize this probably not supported, but I figured I'll just ask, the idea is that if I have
binprogram that accepts check and update, and I want to run one of these commands by default if I didn't pass one of them sobin argumentinvokesbin update argumentfor exampleBeta Was this translation helpful? Give feedback.
All reactions