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/cliffy@v1.0.0-rc.3/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
-
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 sobin argument
invokesbin update argument
for exampleBeta Was this translation helpful? Give feedback.
All reactions