A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/npm/commit/c9b534a148818d1a97787c0dfdba5f64ce3618a6 below:

Clarify config documention with multiple boolean flags · npm/npm@c9b534a · GitHub

This repository was archived by the owner on Aug 11, 2022. It is now read-only.

File tree Expand file treeCollapse file tree 1 file changed

+8

-2

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+8

-2

lines changed Original file line number Diff line number Diff line change

@@ -9,8 +9,14 @@ npm gets its configuration values from the following sources, sorted by priority

9 9 10 10

Putting `--foo bar` on the command line sets the `foo` configuration

11 11

parameter to `"bar"`. A `--` argument tells the cli parser to stop

12 -

reading flags. A `--flag` parameter that is at the *end* of the

13 -

command will be given the value of `true`.

12 +

reading flags. Using `--flag` without specifying any value will set

13 +

the value to `true`.

14 + 15 +

Example: `--flag1 --flag2` will set both configuration parameters

16 +

to `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`,

17 +

and `flag2` to `bar`. Finally, `--flag1 --flag2 -- bar` will set

18 +

both configuration parameters to `true`, and the `bar` is taken

19 +

as a command argument.

14 20 15 21

### Environment Variables

16 22

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4