Skip to content

Commit 7e0734f

Browse files
committed
Fix protoc().parent() call
`Path::parent()` returns `None` for root and empty paths, so handle it by panicking in this case. In this case it should never happen under non-contrived circumstances. Signed-off-by: Tom Jakubowski <[email protected]>
1 parent 434b81b commit 7e0734f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/actions/install-deps/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ runs:
5454
remove-haskell: "true"
5555
remove-codeql: "true"
5656

57+
# Sticking to 3.29 because of:
5758
# https://github.com/open-telemetry/opentelemetry-cpp/issues/2998
58-
# Skip on arm64 Linux - use system cmake instead
5959
- name: Setup cmake
6060
# uses: jwlawson/actions-setup-cmake@v2
6161
uses: tomjakubowski/actions-setup-cmake@v0-aarch64-test4

rust/perspective-server/build.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ fn cmake_build() -> Result<Option<PathBuf>, std::io::Error> {
4646
dst.define("ARROW_BUILD_EXAMPLES", "OFF");
4747
dst.define("RAPIDJSON_BUILD_EXAMPLES", "OFF");
4848
dst.define("ARROW_CXX_FLAGS_DEBUG", "-Wno-error");
49-
dst.define("PSP_PROTOC_PATH", protoc().parent());
49+
dst.define(
50+
"PSP_PROTOC_PATH",
51+
protoc()
52+
.parent()
53+
.expect("protoc() returned root path or empty string"),
54+
);
5055
dst.define("CMAKE_COLOR_DIAGNOSTICS", "ON");
5156
dst.define(
5257
"PSP_PROTO_PATH",

0 commit comments

Comments
 (0)