mirror of
https://github.com/nushell/awesome-nu.git
synced 2024-10-26 22:37:45 +03:00
Fix: possible issue with .git
in middle of the url?
This commit is contained in:
parent
0380a8c4f0
commit
302a065436
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user