@@ -38,7 +38,7 @@ inspectPackages[dir_String, cbk_] := Module[{
38
38
] & /@ packages ;
39
39
]
40
40
41
- PacletRepositories [list_ List , OptionsPattern []] := Module [{projectDir , info , repos , cache , updated , removed , new , current , updatable , skipUpdates = OptionValue ["Passive" ], versionControl , maxVersionDiff = OptionValue ["MaxVersionDiff" ]},
41
+ PacletRepositories [list_ List , OptionsPattern []] := Module [{projectDir , info , repos , cache , updated , removed , new , current , updatable , skipUpdates = OptionValue ["Passive" ], automaticUpdates = OptionValue [ "AutomaticUpdates" ], versionControl , maxVersionDiff = OptionValue ["MaxVersionDiff" ]},
42
42
(* making key-values pairs *)
43
43
repos = (# -> < |"key" -> # |> )& /@ list // Association ;
44
44
@@ -132,7 +132,12 @@ PacletRepositories[list_List, OptionsPattern[]] := Module[{projectDir, info, rep
132
132
new = InstallPaclet [projectDir ] /@ new ;
133
133
134
134
(* what must be updated *)
135
- updatable = Select [current , CheckUpdates ];
135
+ If [automaticUpdates ,
136
+ updatable = Select [current , CheckUpdates ];
137
+ ,
138
+ Echo ["LPM >> Automatic updates are suppressed by default since 2.7.6" ];
139
+ updatable = < ||> ;
140
+ ];
136
141
137
142
(* will be updated *)
138
143
updated = ((# -> repos [# ])& /@ Keys [updatable ]) // Association ;
@@ -182,7 +187,7 @@ PacletRepositories[list_List, OptionsPattern[]] := Module[{projectDir, info, rep
182
187
Map [pacletDirectoryLoad ] @ Map [DirectoryName ] @ FileNames ["PacletInfo.wl" , {# }, {2 }]& @ FileNameJoin [{projectDir , "wl_packages" }];
183
188
]
184
189
185
- Options [PacletRepositories ] = {"Directory" -> None , "Passive" -> False , "ForceUpdates" -> False , "MaxVersionDiff" -> None , "UpdateInterval" -> Quantity [14 , "Days" ], "ConflictResolutionFunction" -> Function [{conflicting , true },
190
+ Options [PacletRepositories ] = {"Directory" -> None , "Passive" -> False , "ForceUpdates" -> False , "AutomaticUpdates" -> True , " MaxVersionDiff" -> None , "UpdateInterval" -> Quantity [14 , "Days" ], "ConflictResolutionFunction" -> Function [{conflicting , true },
186
191
Echo ["LPM >> resolving by uninstalling a global one" ];
187
192
If [PacletUninstall [conflicting ] =!= Null ,
188
193
Echo ["FAILED!" ];
0 commit comments