🐛 bug: fix `browse` URL

main
_ 2021-08-29 20:03:09 +00:00
parent 1daac51dd7
commit 84fbcfb718
3 changed files with 3 additions and 6 deletions

View File

@ -1,3 +0,0 @@
The first build of Lookup to implement the `browse` subcommand.
A debug build for Linux x64.

View File

@ -0,0 +1 @@
The first build of Lookup to _correctly_ implement `browse`.

View File

@ -42,13 +42,12 @@ async fn main () -> anyhow::Result <()> {
.get_matches ();
if let Some (matches) = matches.subcommand_matches ("browse") {
let public_repo = "https://six-five-six-four.com/git/reactor/lookup/src/branch/main/lookup_repo/";
let public_repo = "https://six-five-six-four.com/git/reactor/lookup/src/branch/main/lookup_repo";
let input_path = Path::new (matches.value_of ("INPUT").unwrap ());
let b3_hash = hash (input_path)?;
let local_path = PathBuf::from ("lookup_repo").join (repo_path (&b3_hash));
let url = format! ("{}/{:?}", public_repo, local_path);
let url = format! ("{}/{:?}", public_repo, repo_path (&b3_hash));
process::Command::new ("xdg-open")
.arg (url)