File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -777,14 +777,20 @@ pub fn install(
777777 if installed_anything {
778778 // Print a warning that if this directory isn't in PATH that they won't be
779779 // able to run these commands.
780+ let cwd = gctx. cwd ( ) ;
781+ let dst_abs = if dst. is_absolute ( ) {
782+ paths:: normalize_path ( dst. as_path ( ) )
783+ } else {
784+ paths:: normalize_path ( & cwd. join ( & dst) )
785+ } ;
780786 let path = gctx. get_env_os ( "PATH" ) . unwrap_or_default ( ) ;
781787 let dst_in_path = env:: split_paths ( & path) . any ( |path| path == dst) ;
782788
783789 if !dst_in_path {
784790 gctx. shell ( ) . warn ( & format ! (
785791 "be sure to add `{}` to your PATH to be \
786792 able to run the installed binaries",
787- dst . display( )
793+ dst_abs . display( )
788794 ) ) ?;
789795 }
790796 }
Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ fn relative_install_location_without_trailing_slash() {
527527[FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s
528528[INSTALLING] t1/bin/foo[EXE]
529529[INSTALLED] package `foo v0.0.1 ([ROOT]/foo)` (executable `foo[EXE]`)
530- [WARNING] be sure to add `t1/bin` to your PATH to be able to run the installed binaries
530+ [WARNING] be sure to add `[ROOT]/foo/ t1/bin` to your PATH to be able to run the installed binaries
531531
532532"# ] ] )
533533 . run ( ) ;
You can’t perform that action at this time.
0 commit comments