Skip to content

A self-improving RLM agent for coding workflows and long-running autonomous tasks.

Rust

clean up installer shellcheck warnings (#3301)

ktb8c886f78250
diff --git a/crates/pa-cli/tests/installer_platform_map.rs b/crates/pa-cli/tests/installer_platform_map.rs
index c401686647..4f4afe224b 100644
--- a/crates/pa-cli/tests/installer_platform_map.rs
+++ b/crates/pa-cli/tests/installer_platform_map.rs
@@ -55,7 +55,7 @@ fn detect(os: &str, arch: &str) -> Output {
\x20 esac\n\
}}\n\
{block}\n\
- printf '%s|%s|%s|%s\\n' \"$TARGET\" \"$CHANNEL_PLATFORM\" \"$WINDOWS\" \"$BINARY_NAME\"\n"
+ printf '%s|%s|%s\\n' \"$CHANNEL_PLATFORM\" \"$WINDOWS\" \"$BINARY_NAME\"\n"
);
let dir = tempfile::tempdir().expect("scratch dir");
let path = dir.path().join("harness.sh");
@@ -78,40 +78,24 @@ fn map_row(output: &Output) -> String {
#[test]
fn the_uname_map_resolves_the_published_platforms() {
let cases = [
- (
- "Darwin",
- "arm64",
- "aarch64-apple-darwin|darwin-arm64|no|prime-agent",
- ),
- (
- "Darwin",
- "x86_64",
- "x86_64-apple-darwin|darwin-x64|no|prime-agent",
- ),
- (
- "Linux",
- "x86_64",
- "x86_64-unknown-linux-gnu|linux-x64|no|prime-agent",
- ),
- (
- "Linux",
- "aarch64",
- "aarch64-unknown-linux-gnu|linux-arm64|no|prime-agent",
- ),
+ ("Darwin", "arm64", "darwin-arm64|no|prime-agent"),
+ ("Darwin", "x86_64", "darwin-x64|no|prime-agent"),
+ ("Linux", "x86_64", "linux-x64|no|prime-agent"),
+ ("Linux", "aarch64", "linux-arm64|no|prime-agent"),
(
"MINGW64_NT-10.0-19045",
"x86_64",
- "x86_64-pc-windows-msvc|win32-x64|yes|prime-agent.exe",
+ "win32-x64|yes|prime-agent.exe",
),
(
"MSYS_NT-10.0-19045",
"x86_64",
- "x86_64-pc-windows-msvc|win32-x64|yes|prime-agent.exe",
+ "win32-x64|yes|prime-agent.exe",
),
(
"CYGWIN_NT-10.0-19045",
"x86_64",
- "x86_64-pc-windows-msvc|win32-x64|yes|prime-agent.exe",
+ "win32-x64|yes|prime-agent.exe",
),
];
for (os, arch, expected) in cases {
diff --git a/install-rust.sh b/install-rust.sh
index edf6712e92..66e9debfc7 100755
--- a/install-rust.sh
+++ b/install-rust.sh
@@ -778,14 +778,14 @@ ARCH="$(uname -m)"
WINDOWS="no"
# CHANNEL_PLATFORM is the channel manifest's platform alias (the TS
# NATIVE_PLATFORMS spelling pa-core::update::install::current_platform_alias
-# reads); TARGET stays the rust triple the payload names its targets by.
+# reads).
case "$OS:$ARCH" in
- Darwin:arm64) TARGET=aarch64-apple-darwin; CHANNEL_PLATFORM=darwin-arm64 ;;
- Darwin:x86_64) TARGET=x86_64-apple-darwin; CHANNEL_PLATFORM=darwin-x64 ;;
- Linux:x86_64) TARGET=x86_64-unknown-linux-gnu; CHANNEL_PLATFORM=linux-x64 ;;
- Linux:aarch64) TARGET=aarch64-unknown-linux-gnu; CHANNEL_PLATFORM=linux-arm64 ;;
+ Darwin:arm64) CHANNEL_PLATFORM=darwin-arm64 ;;
+ Darwin:x86_64) CHANNEL_PLATFORM=darwin-x64 ;;
+ Linux:x86_64) CHANNEL_PLATFORM=linux-x64 ;;
+ Linux:aarch64) CHANNEL_PLATFORM=linux-arm64 ;;
MINGW64_NT*:x86_64|MINGW_NT*:x86_64|MSYS_NT*:x86_64|CYGWIN_NT*:x86_64)
- TARGET=x86_64-pc-windows-msvc; CHANNEL_PLATFORM=win32-x64; WINDOWS=yes ;;
+ CHANNEL_PLATFORM=win32-x64; WINDOWS=yes ;;
*)
die "no rust build is published for ${OS} ${ARCH} (detected via uname);
the release channel builds aarch64-apple-darwin, x86_64-apple-darwin,
@@ -2982,9 +2982,7 @@ fi
# list (the same whitespace ruling).
rust_leftover="no"
verify_stopped_socket() {
- last_verify_leftover="no"
if [ "$("$UVPY" "$probe_py" --listening "$1" 2>/dev/null)" = "up" ]; then
- last_verify_leftover="yes"
if [ "$2" = "yes" ]; then
rust_leftover="yes"
fi