@@ -226,30 +226,37 @@ fn install_solana_cli(
226226 }
227227 Some ( "sig" ) => {
228228 // Install Sig (Solana Zig Validator)
229- // First install Zig compiler
230- client. execute_command ( "curl -sSf https://ziglang.org/download/master/zig-linux-x86_64-0.14.0-dev.tar.xz | tar xJ -C /tmp" ) ?;
231- client. execute_command ( "sudo mv /tmp/zig-linux-x86_64-0.14.0-dev /opt/zig" ) ?;
232- client. execute_command ( "sudo ln -sf /opt/zig/zig /usr/local/bin/zig" ) ?;
233-
234- // Clone and build Sig
235- client. execute_command ( "git clone https://github.com/syndica/sig.git /tmp/sig" ) ?;
236- client. execute_command ( "cd /tmp/sig && zig build -Doptimize=ReleaseFast" ) ?;
237-
238- // Install Sig binaries
239- client. execute_command ( "sudo mkdir -p /opt/sig/bin" ) ?;
240- client. execute_command ( "sudo cp /tmp/sig/zig-out/bin/* /opt/sig/bin/" ) ?;
241-
242- // Create symlinks for compatibility
243- client. execute_command ( "sudo ln -sf /opt/sig/bin/sig /usr/local/bin/solana-validator" ) ?;
244-
245- // For keygen, we'll use the standard Solana keygen as Sig is compatible
246- client. execute_command ( & format ! (
247- "sh -c \" $(curl -sSfL https://release.solana.com/{}/install)\" " ,
248- version
249- ) ) ?;
229+ let result = ( || -> Result < ( ) , DeploymentError > {
230+ // First install Zig compiler
231+ client. execute_command ( "curl -sSf https://ziglang.org/download/master/zig-linux-x86_64-0.14.0-dev.tar.xz | tar xJ -C /tmp" ) ?;
232+ client. execute_command ( "sudo mv /tmp/zig-linux-x86_64-0.14.0-dev /opt/zig" ) ?;
233+ client. execute_command ( "sudo ln -sf /opt/zig/zig /usr/local/bin/zig" ) ?;
234+
235+ // Clone and build Sig
236+ client. execute_command ( "git clone https://github.com/syndica/sig.git /tmp/sig" ) ?;
237+ client. execute_command ( "cd /tmp/sig && zig build -Doptimize=ReleaseFast" ) ?;
238+
239+ // Install Sig binaries
240+ client. execute_command ( "sudo mkdir -p /opt/sig/bin" ) ?;
241+ client. execute_command ( "sudo cp /tmp/sig/zig-out/bin/* /opt/sig/bin/" ) ?;
242+
243+ // Create symlinks for compatibility
244+ client. execute_command ( "sudo ln -sf /opt/sig/bin/sig /usr/local/bin/solana-validator" ) ?;
245+
246+ // For keygen, we'll use the standard Solana keygen as Sig is compatible
247+ client. execute_command ( & format ! (
248+ "sh -c \" $(curl -sSfL https://release.solana.com/{}/install)\" " ,
249+ version
250+ ) ) ?;
251+
252+ Ok ( ( ) )
253+ } ) ( ) ;
250254
251- // Clean up
255+ // Ensure cleanup is performed
252256 client. execute_command ( "rm -rf /tmp/sig" ) ?;
257+
258+ // Propagate errors
259+ result?;
253260 }
254261 _ => {
255262 // Install standard Solana client
0 commit comments