🐛 bug: fix `browse` URL
parent
1daac51dd7
commit
84fbcfb718
|
@ -1,3 +0,0 @@
|
||||||
The first build of Lookup to implement the `browse` subcommand.
|
|
||||||
|
|
||||||
A debug build for Linux x64.
|
|
|
@ -0,0 +1 @@
|
||||||
|
The first build of Lookup to _correctly_ implement `browse`.
|
|
@ -42,13 +42,12 @@ async fn main () -> anyhow::Result <()> {
|
||||||
.get_matches ();
|
.get_matches ();
|
||||||
|
|
||||||
if let Some (matches) = matches.subcommand_matches ("browse") {
|
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 input_path = Path::new (matches.value_of ("INPUT").unwrap ());
|
||||||
let b3_hash = hash (input_path)?;
|
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")
|
process::Command::new ("xdg-open")
|
||||||
.arg (url)
|
.arg (url)
|
||||||
|
|
Loading…
Reference in New Issue