File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -18,18 +18,18 @@ use tempfile::Builder as TempFileBuilder;
18
18
/// environment variable this is will be used for, which is included in the
19
19
/// error message.
20
20
pub fn join_paths < T : AsRef < OsStr > > ( paths : & [ T ] , env : & str ) -> Result < OsString > {
21
- env:: join_paths ( paths. iter ( ) )
22
- . with_context ( || {
23
- let paths = paths . iter ( ) . map ( Path :: new ) . collect :: < Vec < _ > > ( ) ;
24
- format ! ( "failed to join path array: {:?}" , paths )
25
- } )
26
- . with_context ( || {
27
- format ! (
28
- "failed to join search paths together \n \
29
- Does ${} have an unterminated quote character? ",
30
- env
31
- )
32
- } )
21
+ env:: join_paths ( paths. iter ( ) ) . with_context ( || {
22
+ let paths = paths . iter ( ) . map ( Path :: new ) . collect :: < Vec < _ > > ( ) ;
23
+ format ! (
24
+ "failed to join paths from `${}` together \
25
+ \n \
26
+ If you set `${}` manually, check if it contains an unterminated quote character \
27
+ or path separators (usually `:` or `:`). Please avoid using them. \
28
+ \n \n \
29
+ Otherwise, check if any of paths listed contain one of those characters: {:?} ",
30
+ env , env, paths
31
+ )
32
+ } )
33
33
}
34
34
35
35
/// Returns the name of the environment variable used for searching for
You can’t perform that action at this time.
0 commit comments