Comments (5)
@woodpecker-ci/maintainers I would like to work on improve error handling for missing args (missing repo id / name results in an parseInt error atm)
How do we want to handle it? Do we really want to continue using args? IMO, it would be better to drop args completely and just use flags. Any reason to keep using args?
from woodpecker.
I think its quite common practice to use args (see kubectl, docker, ...) therefore I would suggest to stick to it and add an empty-string check with a more descriptive error in front of the parseInt
call.
from woodpecker.
Obviously, but I could also name a lot of tools without args. We could have a way more clean code without arg validation, as flag validation and required flags is a built-in feature of urfave/cli. However, if args is preferred, that works for me as well.
from woodpecker.
I don't know if urfave/cli still checks that required arguments are not empty if required (you can provide argument but provide it with empty value) so check for empty value could still be needed
from woodpecker.
There is no required args feature, just a required flags option.
from woodpecker.
Related Issues (20)
- Workflow execution is stuck: "not started yet" HOT 2
- Major release HOT 7
- Shutting agent down shouldn't connect to server when server is not running
- Bug: last part of 'command' is being truncating causing steady error HOT 2
- Org settings not loading anymore
- K8S Backend - Ability to add a side container to a step (pod)
- CI_WORKSPACE variable doesn't work with string substitution HOT 4
- Custom environment variables don't work with string substitution HOT 10
- Redirection after oauth2 login should point to page which initiated the login HOT 5
- matrix with combinations AND includes
- Service containers have their working directory changed when launched
- Disable auto-fallback to Local backend
- Prohibit image usage in local backend HOT 2
- Remove 3898 from release notes
- Inefficient handling of verbose log output HOT 5
- cli: Keyring is not supported on this platform HOT 5
- FTL error running cli error="json: cannot unmarshal array into Go value of type woodpecker.Secret" HOT 3
- Cron migration fails HOT 6
- Setting WOODPECKER_DATABASE_DRIVER and WOODPECKER_DATABASE_DATASOURCE starts using sqlite HOT 1
- Massive load on agents table since 2.7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from woodpecker.