Skip to content

Commit

Permalink
Fix file paths and hyperlinks
Browse files Browse the repository at this point in the history
Fixes #890
  • Loading branch information
dandavison committed Feb 13, 2022
1 parent 6e7a934 commit 9ed3672
Show file tree
Hide file tree
Showing 9 changed files with 567 additions and 164 deletions.
9 changes: 7 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ use crate::parse_styles;
use crate::style;
use crate::style::Style;
use crate::tests::TESTING;
use crate::utils;
use crate::utils::bat::output::PagingMode;
use crate::utils::cwd::cwd_of_user_shell_process;
use crate::utils::regex_replacement::RegexReplacement;
use crate::utils::syntect::FromDeltaStyle;
use crate::wrapping::WrapConfig;
Expand Down Expand Up @@ -245,9 +245,14 @@ impl From<cli::Opt> for Config {

let wrap_max_lines_plus1 = adapt_wrap_max_lines_argument(opt.wrap_max_lines);

#[cfg(not(test))]
let cwd_of_delta_process = std::env::current_dir().ok();
#[cfg(test)]
let cwd_of_delta_process = Some(utils::path::fake_delta_cwd_for_tests());

let cwd_relative_to_repo_root = std::env::var("GIT_PREFIX").ok();
let cwd_of_user_shell_process = cwd_of_user_shell_process(

let cwd_of_user_shell_process = utils::path::cwd_of_user_shell_process(
cwd_of_delta_process.as_ref(),
cwd_relative_to_repo_root.as_deref(),
);
Expand Down
Loading

0 comments on commit 9ed3672

Please sign in to comment.