Skip to content

Commit 37e5f4d

Browse files
committed
next/software: fix a key collision in processing the inventory
1 parent 5abdd6c commit 37e5f4d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/packages/next/lib/landing/software-specs.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import { keys, map, sortBy, zipObject } from "lodash";
77
import { promises } from "node:fs";
8-
import { basename } from "node:path";
98

109
import {
1110
SOFTWARE_ENV_NAMES,
@@ -137,9 +136,8 @@ async function getSoftwareSpec(name: SoftwareEnvNames): Promise<SoftwareSpec> {
137136
if (nextSpec[info.lang] == null) {
138137
nextSpec[info.lang] = {};
139138
}
140-
// the basename of the cmd path
141-
const base = cmd.indexOf(" ") > 0 ? cmd : basename(cmd);
142-
nextSpec[info.lang][base] = {
139+
// use the full command as key to avoid basename collisions
140+
nextSpec[info.lang][cmd] = {
143141
cmd,
144142
name: info.name,
145143
doc: info.doc,

0 commit comments

Comments
 (0)