substack/node-optimist — Issue #44: How to demand an argument value instead of it defaulting to true?
Author: clintharris
Created: 2012-02-15 19:38:33+00:00
State: open

Given the following:

```javascript
var argv = optimist.usage('Usage: $0 --config ', {
'config': {
description: "Path to config file",
demand: 'true',
string: true
}
}).argv;
```
I was hoping the following usage would *not* be accepted:

```javascript
node myapp.js --config
```

In other words, I consider `--config path/to/file` to be valid usage but `--config` invalid. Instead, "validation" passes and optimist sets `argv.config` to have value `true`.

**Is there some way I can configure optimist to not accept "empty" arguments like this?**

Thanks!