Skip to content

Commit 593a5df

Browse files
alan-agius4atscott
authored andcommitted
build: make webmcp-types sources genrule cross-platform
Replace `sed -i` in-place substitution with direct stdout redirection from the source file to destination outputs. `sed -i` behaves differently between GNU and BSD sed, which caused build failures on macOS.
1 parent 8576f16 commit 593a5df

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • packages/core/third_party/@mcp-b/webmcp-types

packages/core/third_party/@mcp-b/webmcp-types/BUILD.bazel

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ genrule(
1111
cmd = """
1212
readonly SRC_DIR="$(location //packages/core:node_modules/@mcp-b/webmcp-types/dir)"
1313
mkdir -p "$$(dirname "$(location dist/common.d.ts)")"
14-
cp "$${SRC_DIR}/dist/common.d.ts" "$(location dist/common.d.ts)"
1514
# Rewrite bare imports of @modelcontextprotocol/server to use the vendored relative path
16-
sed -i 's|@modelcontextprotocol/server|../../../@modelcontextprotocol/server/index.js|g' "$(location dist/common.d.ts)" || true
17-
cp "$${SRC_DIR}/dist/json-schema.d.ts" "$(location dist/json-schema.d.ts)"
18-
sed -i 's|@modelcontextprotocol/server|../../../@modelcontextprotocol/server/index.js|g' "$(location dist/json-schema.d.ts)" || true
15+
sed 's|@modelcontextprotocol/server|../../../@modelcontextprotocol/server/index.js|g' "$${SRC_DIR}/dist/common.d.ts" > "$(location dist/common.d.ts)"
16+
sed 's|@modelcontextprotocol/server|../../../@modelcontextprotocol/server/index.js|g' "$${SRC_DIR}/dist/json-schema.d.ts" > "$(location dist/json-schema.d.ts)"
1917
cp "$${SRC_DIR}/LICENSE" "$(location LICENSE)"
2018
""",
2119
)

0 commit comments

Comments
 (0)