Fix windows build (#6774)
This commit is contained in:
		@@ -533,6 +533,9 @@ pub fn main() {
 | 
			
		||||
        option_env!("CI_COMMIT").unwrap_or("unknown")
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    let _log_redirect = {
 | 
			
		||||
        #[cfg(unix)]
 | 
			
		||||
        {
 | 
			
		||||
            let default_logfile = format!(
 | 
			
		||||
                "solana-validator-{}-{}.log",
 | 
			
		||||
                identity_keypair.pubkey(),
 | 
			
		||||
@@ -540,11 +543,9 @@ pub fn main() {
 | 
			
		||||
            );
 | 
			
		||||
            let logfile = matches.value_of("logfile").unwrap_or(&default_logfile);
 | 
			
		||||
 | 
			
		||||
    let _log_redirect = if logfile == "-" {
 | 
			
		||||
            if logfile == "-" {
 | 
			
		||||
                None
 | 
			
		||||
            } else {
 | 
			
		||||
        #[cfg(unix)]
 | 
			
		||||
        {
 | 
			
		||||
                println!("log file: {}", logfile);
 | 
			
		||||
                Some(gag::Redirect::stderr(File::create(logfile).unwrap_or_else(
 | 
			
		||||
                    |err| {
 | 
			
		||||
@@ -553,10 +554,11 @@ pub fn main() {
 | 
			
		||||
                    },
 | 
			
		||||
                )))
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        #[cfg(not(unix))]
 | 
			
		||||
        {
 | 
			
		||||
            println!("logging to a file is not supported on this platform");
 | 
			
		||||
            None
 | 
			
		||||
            ()
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user