File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -463,11 +463,14 @@ async fn store_ssh_information(
463463 . open ( ssh_config_path) ?;
464464 let mut content = String :: new ( ) ;
465465 ssh_config. read_to_string ( & mut content) ?;
466- if !content. contains ( & format ! ( "Include {}" , coman_ssh_config_path. clone( ) . display( ) ) ) {
466+ if !content. contains ( & format ! ( "Include \" {}\" " , coman_ssh_config_path. clone( ) . display( ) ) )
467+ && !content. contains ( & format ! ( "Include {}" , coman_ssh_config_path. clone( ) . display( ) ) )
468+ // second condition kept for backward compatibility, path was not always quoted
469+ {
467470 let mut writer = BufWriter :: new ( ssh_config) ;
468471 write ! (
469472 writer,
470- "\n \n #coman include\n Match all\n Include {} " ,
473+ "\n \n #coman include\n Match all\n Include \" {} \" " ,
471474 coman_ssh_config_path. display( )
472475 ) ?;
473476 }
You can’t perform that action at this time.
0 commit comments