Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

Conversation

jesec
Copy link
Contributor

@jesec jesec commented Mar 31, 2021

Much better with "--help" and default values. It also allows us to set CLI
options with PKG_FETCH_OPTION_. For instance:

PKG_FETCH_OPTION_n=node14
PKG_FETCH_OPTION_b=true

builds Node 14 for the host platform and arch. might be useful for Dockerfile-scripts.

We can add descriptions in a later change to make this even more user-friendly.

$ pkg-fetch -h
Options:
-n, --node-range [string] [default: "latest"]
-p, --platform [string] [default: "linux"]
-a, --arch [string] [default: "x64"]
-f, --force-fetch [boolean]
-b, --force-build [boolean]
-v, --version Show version number [boolean]
-h, --help Show help [boolean]

Much better with "--help" and default values. It also allows us to set CLI
options with PKG_FETCH_OPTION_. For instance:

PKG_FETCH_OPTION_n=node14
PKG_FETCH_OPTION_b=true

builds Node 14 for the host platform and arch. might be useful for Dockerfile-scripts.

We can add descriptions in a later change to make this even more user-friendly.

 $ pkg-fetch -h
Options:
  -n, --node-range                                  [string] [default: "latest"]
  -p, --platform                                     [string] [default: "linux"]
  -a, --arch                                           [string] [default: "x64"]
  -f, --force-fetch                                                    [boolean]
  -b, --force-build                                                    [boolean]
  -v, --version      Show version number                               [boolean]
  -h, --help         Show help                                         [boolean]
@jesec jesec requested review from leerob and robertsLando March 31, 2021 14:24
@leerob leerob merged commit ba011e4 into master Mar 31, 2021
@leerob leerob deleted the pr/yargs branch March 31, 2021 14:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants