How do you access flag values in custom commands? #6430
-
I have the following custom command definition. How do I access the value of the ## Description: Run Experience Builder's Cypress tests.
## Usage: xb-cy-run
## Flags: [{"Name":"spec","Shorthand":"s","Usage":"run specific spec (files)","Type":"string","DefValue":"*/*.cy.js"}] |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @TravisCarden , welcome. If you look at the launch command, you'll see that it's ordinary bash argument handling. You can read about that in most bash tutorials, but launch is probably good enough to get you going. Mostly the |
Beta Was this translation helpful? Give feedback.
-
Thanks, @rfay! I thought that might be the case, but I hated to assume and embarrass myself. 😉 |
Beta Was this translation helpful? Give feedback.
Hi @TravisCarden , welcome. If you look at the launch command, you'll see that it's ordinary bash argument handling. You can read about that in most bash tutorials, but launch is probably good enough to get you going.
Mostly the
Flags
directive is just there to provide hints toddev help <command>
about what it should say.