Fix: possible issue with .git in middle of the url?

This commit is contained in:
Motalleb Fallahnezhad 2024-04-20 21:03:12 +03:30
parent 0380a8c4f0
commit 302a065436
No known key found for this signature in database
GPG Key ID: 1743EBCA6E552821

View File

@ -133,8 +133,7 @@ export module plugin-list {
def "get-toml" [
branch: string # branch name (e.g. main)
]: string -> record {
let git_repo = ($in | str replace ".git" "") # github repository url (e.g. https://github.com/FMotalleb/nu_plugin_port_scan)
let git_repo = ($in | str replace --regex ".git$" "") # github repository url (e.g. https://github.com/FMotalleb/nu_plugin_port_scan)
let toml_file_address: string = (get-raw-toml-address $git_repo $branch | url join)
try {
return (http get --raw $toml_file_address | from toml)