File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ export async function addDependency(
4949 resolvedOptions . packageManager . name === "yarn"
5050 ? [
5151 ...getWorkspaceArgs ( resolvedOptions ) ,
52+ // Global is not supported in berry: yarnpkg/berry#821
53+ resolvedOptions . global &&
54+ resolvedOptions . packageManager . majorVersion === "1"
55+ ? "global"
56+ : "" ,
5257 "add" ,
5358 resolvedOptions . dev ? "-D" : "" ,
5459 ...names ,
@@ -108,11 +113,10 @@ export async function removeDependency(
108113 const args = (
109114 resolvedOptions . packageManager . name === "yarn"
110115 ? [
111- // prettier-ignore
112- resolvedOptions . global
113- ? ( resolvedOptions . packageManager . majorVersion === "1"
114- ? "dlx"
115- : "global" )
116+ // Global is not supported in berry: yarnpkg/berry#821
117+ resolvedOptions . global &&
118+ resolvedOptions . packageManager . majorVersion === "1"
119+ ? "global"
116120 : "" ,
117121 ...getWorkspaceArgs ( resolvedOptions ) ,
118122 "remove" ,
You can’t perform that action at this time.
0 commit comments