File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
tokens/pda-mint-authority/steel/program Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 22use std:: fs;
33use std:: process:: Command ;
44
5+ fn check_solana_installation ( ) -> Result < ( ) , String > {
6+ match Command :: new ( "solana" ) . arg ( "--version" ) . output ( ) {
7+ Ok ( output) => {
8+ if output. status . success ( ) {
9+ Ok ( ( ) )
10+ } else {
11+ Err ( "Solana CLI is available but returned an error" . to_string ( ) )
12+ }
13+ }
14+ Err ( e) => Err ( format ! ( "Solana CLI is not installed or not in PATH: {}" , e) ) ,
15+ }
16+ }
17+
518fn main ( ) {
619 println ! ( "cargo:rerun-if-changed=build.rs" ) ;
720
21+ // Check if Solana is installed
22+ if let Err ( err) = check_solana_installation ( ) {
23+ println ! ( "cargo:warning=Solana check failed: {}" , err) ;
24+ return ;
25+ }
26+
827 // Create the fixtures directory path
928 fs:: create_dir_all ( "tests/fixtures" ) . expect ( "Failed to create fixtures directory" ) ;
1029
You can’t perform that action at this time.
0 commit comments