Skip to content

Commit 71afbe1

Browse files
committed
Add documentation
1 parent bc8285c commit 71afbe1

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

‎apps/rush-lib/assets/rush-init/common/config/rush/command-line.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@
4646
*/
4747
"description": "This is an example custom command that runs separately for each project",
4848

49+
/**
50+
* By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously
51+
* in the same repo folder. (For example, it would be a mistake to run "rush install" and "rush build" at the
52+
* same time.) If your command makes sense to run concurrently with other operations,
53+
* set "safeForSimultaneousRushProcesses" to true to disable this protection.
54+
*
55+
* In particular, this is needed for custom scripts that invoke other Rush commands.
56+
*/
57+
"safeForSimultaneousRushProcesses": false,
58+
4959
/**
5060
* (Required) If true, then this command is safe to be run in parallel, i.e. executed
5161
* simultaneously for multiple projects. Similar to "rush build", regardless of parallelism
@@ -72,6 +82,8 @@
7282
"summary": "Example global custom command",
7383
"description": "This is an example custom command that runs once for the entire repo",
7484

85+
"safeForSimultaneousRushProcesses": false,
86+
7587
/**
7688
* A script that will be invoked using the OS shell. The working directory will be the folder
7789
* that contains rush.json. If custom parameters are associated with this command, their

‎apps/rush-lib/src/cli/actions/BaseRushAction.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ import { Utilities } from '../../utilities/Utilities';
1919

2020
export interface IBaseRushActionOptions extends ICommandLineActionOptions {
2121
/**
22-
* If true, no locking mechanism will be enforced when this action is run.
23-
* Note this defaults to false (which is a safer assumption in case this value
24-
* is omitted).
22+
* By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously
23+
* in the same repo folder. (For example, it would be a mistake to run "rush install" and "rush build" at the
24+
* same time.) If your command makes sense to run concurrently with other operations,
25+
* set safeForSimultaneousRushProcesses=true to disable this protection. In particular, this is needed for
26+
* custom scripts that invoke other Rush commands.
2527
*/
2628
safeForSimultaneousRushProcesses?: boolean;
2729

‎apps/rush-lib/src/schemas/command-line.schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"safeForSimultaneousRushProcesses": {
4646
"title": "Safe For Simultaneous Rush Processes",
47-
"description": "Can this command trigger additional rush processes, useful if you want a rush command to trigger another rush command.",
47+
"description": "By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously in the same repo folder. (For example, it would be a mistake to run \"rush install\" and \"rush build\" at the same time.) If your command makes sense to run concurrently with other operations, set safeForSimultaneousRushProcesses=true to disable this protection. In particular, this is needed for custom scripts that invoke other Rush commands.",
4848
"type": "boolean"
4949
}
5050
}

0 commit comments

Comments
 (0)