Skip to content

Commit

Permalink
fix: remove .git at the end of url
Browse files Browse the repository at this point in the history
  • Loading branch information
FMotalleb committed Apr 20, 2024
1 parent 0566024 commit 0380a8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions action.nu
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ export module plugin-list {
def "get-toml" [
branch: string # branch name (e.g. main)
]: string -> record {
let git_repo = $in # github repository url (e.g. https://github.com/FMotalleb/nu_plugin_port_scan)
let git_repo = ($in | str replace ".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)
Expand Down Expand Up @@ -167,7 +168,7 @@ export module plugin-list {
repository: string
]: record -> record {
let toml: record = $in
if ([$toml.package?, $toml.dependencies?] | all {|i| $i != null} ) {
if ([$toml.package?, $toml.dependencies?] | all {|i| $i != null}) {
return {
name: $"[($toml.package.name)]\(($repository)\)"
version: $toml.package.version
Expand Down
5 changes: 2 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,13 @@ plugins:
- name: nu_plugin_dpkgtable
language: rust
repository:
url: https://github.com/pdenapo/nu_plugin_dpkgtable.git
branch: main
url: https://github.com/pdenapo/nu_plugin_dpkgtable
branch: main
- name: nu_plugin_from_sse
language: rust
repository:
url: https://github.com/cablehead/nu_plugin_from_sse
branch: main

# Example
# - name: nu_plugin_bin_reader # the plugins name (mandatory)
# language: python # programming language (mandatory)
Expand Down

0 comments on commit 0380a8c

Please sign in to comment.