@@ -208,12 +208,27 @@ def moz_fetches_dir(value):
208
208
return value [0 ]
209
209
210
210
211
- @depends (developer_options , moz_fetches_dir )
212
- def bootstrap_search_path_order (developer_options , moz_fetches_dir ):
211
+ option (
212
+ "--enable-bootstrap" ,
213
+ nargs = "?" ,
214
+ choices = ("install" , "update" ),
215
+ help = "Automatically update/bootstrap some toolchains when they are present but out of date" ,
216
+ )
217
+
218
+
219
+ @depends (developer_options , "--enable-bootstrap" , moz_fetches_dir )
220
+ def bootstrap_search_path_order (developer_options , bootstrap , moz_fetches_dir ):
213
221
if moz_fetches_dir :
214
222
log .debug ("Prioritizing MOZ_FETCHES_DIR in toolchain path." )
215
223
return "prepend"
216
224
225
+ if bootstrap :
226
+ log .debug (
227
+ "Prioritizing mozbuild state dir in toolchain paths because "
228
+ "bootstrap mode is enabled."
229
+ )
230
+ return "prepend"
231
+
217
232
if developer_options :
218
233
log .debug (
219
234
"Prioritizing mozbuild state dir in toolchain paths because "
@@ -239,16 +254,7 @@ def original_path():
239
254
return environ ["PATH" ].split (os .pathsep )
240
255
241
256
242
- option (
243
- "--enable-bootstrap" ,
244
- nargs = "?" ,
245
- choices = ("install" , "update" ),
246
- when = developer_options ,
247
- help = "Automatically update/bootstrap some toolchains when they are present but out of date" ,
248
- )
249
-
250
-
251
- @depends ("--enable-bootstrap" , when = developer_options )
257
+ @depends ("--enable-bootstrap" )
252
258
def bootstrap (value ):
253
259
if value :
254
260
# value here is either an empty tuple, or a tuple containing either
0 commit comments