Skip to content

Commit 6faf1f7

Browse files
committed
add os option
1 parent 4abe742 commit 6faf1f7

File tree

5 files changed

+35
-2
lines changed

5 files changed

+35
-2
lines changed

lib/commands/install.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class Install extends ArboristWorkspaceCmd {
3535
'fund',
3636
'dry-run',
3737
'cpu',
38+
'os',
3839
...super.params,
3940
]
4041

tap-snapshots/test/lib/commands/config.js.test.cjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna
3434
"color": true,
3535
"commit-hooks": true,
3636
"cpu": null,
37+
"os": null,
3738
"depth": null,
3839
"description": true,
3940
"dev": false,
@@ -260,6 +261,7 @@ omit = []
260261
omit-lockfile-registry-resolved = false
261262
only = null
262263
optional = null
264+
os = null
263265
otp = null
264266
pack-destination = "."
265267
package = []

tap-snapshots/test/lib/docs.js.test.cjs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,16 @@ time.
10951095
10961096
10971097
1098+
#### \`os\`
1099+
1100+
* Default: null
1101+
* Type: null or String
1102+
1103+
Override OS of native modules to install. Acceptable values are same as \`os\`
1104+
field of package.json, which comes from \`process.platform\`.
1105+
1106+
1107+
10981108
#### \`otp\`
10991109
11001110
* Default: null
@@ -2017,6 +2027,7 @@ Array [
20172027
"color",
20182028
"commit-hooks",
20192029
"cpu",
2030+
"os",
20202031
"depth",
20212032
"description",
20222033
"dev",
@@ -2171,6 +2182,7 @@ Array [
21712182
"color",
21722183
"commit-hooks",
21732184
"cpu",
2185+
"os",
21742186
"depth",
21752187
"description",
21762188
"dev",
@@ -2374,6 +2386,7 @@ Object {
23742386
"offline": false,
23752387
"omit": Array [],
23762388
"omitLockfileRegistryResolved": false,
2389+
"os": null,
23772390
"otp": null,
23782391
"package": Array [],
23792392
"packageLock": true,
@@ -3183,7 +3196,7 @@ Options:
31833196
[--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
31843197
[--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only]
31853198
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links]
3186-
[--no-fund] [--dry-run] [--cpu <cpu>]
3199+
[--no-fund] [--dry-run] [--cpu <cpu>] [--os <os>]
31873200
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
31883201
[-ws|--workspaces] [--include-workspace-root] [--install-links]
31893202
@@ -3215,6 +3228,7 @@ aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
32153228
#### \`fund\`
32163229
#### \`dry-run\`
32173230
#### \`cpu\`
3231+
#### \`os\`
32183232
#### \`workspace\`
32193233
#### \`workspaces\`
32203234
#### \`include-workspace-root\`
@@ -3275,7 +3289,7 @@ Options:
32753289
[--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
32763290
[--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only]
32773291
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links]
3278-
[--no-fund] [--dry-run] [--cpu <cpu>]
3292+
[--no-fund] [--dry-run] [--cpu <cpu>] [--os <os>]
32793293
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
32803294
[-ws|--workspaces] [--include-workspace-root] [--install-links]
32813295
@@ -3307,6 +3321,7 @@ alias: it
33073321
#### \`fund\`
33083322
#### \`dry-run\`
33093323
#### \`cpu\`
3324+
#### \`os\`
33103325
#### \`workspace\`
33113326
#### \`workspaces\`
33123327
#### \`include-workspace-root\`

workspaces/config/lib/definitions/definitions.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,17 @@ define('cpu', {
483483
flatten,
484484
})
485485

486+
define('os', {
487+
default: null,
488+
type: [null, String],
489+
description: `
490+
Override OS of native modules to install.
491+
Acceptable values are same as \`os\` field of package.json,
492+
which comes from \`process.platform\`.
493+
`,
494+
flatten,
495+
})
496+
486497
define('depth', {
487498
default: null,
488499
defaultDescription: `

workspaces/config/tap-snapshots/test/type-description.js.test.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ Object {
339339
null,
340340
"boolean value (true or false)",
341341
],
342+
"os": Array [
343+
null,
344+
Function String(),
345+
],
342346
"otp": Array [
343347
null,
344348
Function String(),

0 commit comments

Comments
 (0)