fn write_command_shim( path: &Path, install_dir: &Path, command_name: &str, target: Option<&ShimTarget>, ) -> Result<()>