Skip to content

Commit bfc880a

Browse files
#1545: Fixed Yarn installation (#1546)
1 parent cc51ba5 commit bfc880a

File tree

16 files changed

+14
-20
lines changed

16 files changed

+14
-20
lines changed

CHANGELOG.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
This file documents all notable changes to https://github.com/devonfw/IDEasy[IDEasy].
44

5+
== 2025.10.002
6+
7+
Release with new features and bugfixes:
8+
9+
* https://github.com/devonfw/IDEasy/issues/1545[#1545]: Yarn can not be installed after corepack
10+
11+
The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/36?closed=1[milestone 2025.10.002].
12+
513
== 2025.10.001
614

715
Release with new features and bugfixes:

cli/src/main/java/com/devonfw/tools/ide/tool/node/NodeBasedCommandlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ protected void runPackageUninstall(String npmPackage) {
134134
*/
135135
protected void runPackageInstall(String npmPackage) {
136136

137-
runPackageManager("install", "-g", npmPackage).failOnError();
137+
runPackageManager("install", "-gf", npmPackage).failOnError();
138138
}
139139

140140
/**

cli/src/test/java/com/devonfw/tools/ide/tool/corepack/CorepackTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void testCorepackRun(WireMockRuntimeInfo wireMockRuntimeInfo) {
8787

8888
private void checkInstallation(IdeTestContext context) {
8989

90-
assertThat(context).logAtInfo().hasMessageContaining("npm install -g corepack@0.34.0");
90+
assertThat(context).logAtInfo().hasMessageContaining("npm install -gf corepack@0.34.0");
9191
assertThat(context).logAtSuccess().hasMessageContaining("Setting npm config prefix to: " + context.getSoftwarePath().resolve("node") + " was successful");
9292
assertThat(context).logAtSuccess().hasMessage("Successfully installed corepack in version 0.34.0");
9393
}

cli/src/test/java/com/devonfw/tools/ide/tool/ng/NgTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
import com.devonfw.tools.ide.context.AbstractIdeContextTest;
66
import com.devonfw.tools.ide.context.IdeTestContext;
7-
import com.devonfw.tools.ide.os.SystemInfo;
8-
import com.devonfw.tools.ide.os.SystemInfoMock;
97
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
108
import com.github.tomakehurst.wiremock.junit5.WireMockTest;
119

@@ -85,7 +83,7 @@ public void testNgRun(WireMockRuntimeInfo wireMockRuntimeInfo) {
8583

8684
private void checkInstallation(IdeTestContext context) {
8785

88-
assertThat(context).logAtInfo().hasMessageContaining("npm install -g @angular/cli@18.0.1");
86+
assertThat(context).logAtInfo().hasMessageContaining("npm install -gf @angular/cli@18.0.1");
8987

9088
assertThat(context).logAtSuccess().hasMessage("Successfully installed ng in version 18.0.1");
9189
}

cli/src/test/java/com/devonfw/tools/ide/tool/yarn/YarnTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void testYarnRun(WireMockRuntimeInfo wireMockRuntimeInfo) {
8484

8585
private void checkInstallation(IdeTestContext context) {
8686

87-
assertThat(context).logAtInfo().hasMessageContaining("npm install -g yarn@2.4.3");
87+
assertThat(context).logAtInfo().hasMessageContaining("npm install -gf yarn@2.4.3");
8888
assertThat(context).logAtSuccess().hasMessageContaining("Setting npm config prefix to: " + context.getSoftwarePath().resolve("node") + " was successful");
8989
assertThat(context).logAtSuccess().hasMessage("Successfully installed yarn in version 2.4.3");
9090
}

cli/src/test/resources/ide-projects/ng/repository/node/node/default/mac/bin/ng

Lines changed: 0 additions & 2 deletions
This file was deleted.

cli/src/test/resources/ide-projects/ng/repository/node/node/default/mac/bin/npm

Lines changed: 0 additions & 2 deletions
This file was deleted.

cli/src/test/resources/ide-projects/ng/repository/node/node/default/mac/bin/npx

Lines changed: 0 additions & 2 deletions
This file was deleted.

cli/src/test/resources/ide-projects/ng/repository/node/node/default/linux/bin/ng renamed to cli/src/test/resources/ide-projects/ng/repository/node/node/default/ng

File renamed without changes.

cli/src/test/resources/ide-projects/ng/repository/node/node/default/linux/bin/npm renamed to cli/src/test/resources/ide-projects/ng/repository/node/node/default/npm

File renamed without changes.

0 commit comments

Comments
 (0)