You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: godot_api_json.rs
    path of file: ./repos/gdnative/bindings-generator/src
    
    the code of the file until where you have to start completion: use crate::godot_version;
use std::fs;
use std::path::PathBuf;
use std::process::Command;

pub fn generate_json_if_needed() -> bool {
    let godot_bin: PathBuf = if let Ok(string) = std::env::var("GODOT_BIN") {
        println!("Found GODOT_BIN with path to executable: '{}'", string);
        PathBuf::from(string)
    } else if let Ok(path) = which::which("godot") {
        println!("Found 'godot' executable in PATH: {}", path.display());
        path
    } else {
        panic!(
            "Feature 'custom-go
    
fn exec_maybe(attempts: i32, command: &mut Command) -> Option<String> {
    let command_line = format!("{:?}", command);

    for _attempt in 0..attempts {
        match command.output() {
            Ok(output) => {
                return Some(String::from_utf8(output.stdout).expect("parse UTF8 string"))
            }
            Err(err) => {
                eprintln!(
                    "Godot command failed:\n  command: {}\n  error: {}",
                    command_line, err
                )
            }
        }
    }

    None
}