Skip to content

Commit

Permalink
Fix parsing errors for nushell nightly (#112)
Browse files Browse the repository at this point in the history
## Description

> Fixes the invalid type signature that is now caught by
[nushell/nushell#14510](nushell/nushell#14510)
  • Loading branch information
Bahex authored Dec 22, 2024
1 parent c968482 commit a39fcce
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nupm/publish.nu
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export def main [
}
}

def guess-url [] -> string {
def guess-url []: nothing -> string {
mut url = (do -i { ^git remote get-url origin | complete } | get stdout)

if ($url | is-empty) {
Expand All @@ -191,7 +191,7 @@ def guess-url [] -> string {
$url | str trim
}

def guess-revision [] -> string {
def guess-revision []: nothing -> string {
mut revision = (do -i { ^git describe --tags --abbrev=0 | complete }
| get stdout)

Expand Down
2 changes: 1 addition & 1 deletion nupm/status.nu
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use utils/package.nu [open-package-file list-package-files]
# Display status of a package
export def main [
path?: path # path to the package
] -> record<filename: string> {
]: nothing -> record<filename: string> {
let path = $path | default $env.PWD | path expand

let pkg = open-package-file $path
Expand Down
2 changes: 1 addition & 1 deletion nupm/utils/package.nu
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export def open-package-file [dir: path] {
# Lists files of a package
#
# This will be useful for file integrity checks
export def list-package-files [pkg_dir: path, pkg: record] -> list<path> {
export def list-package-files [pkg_dir: path, pkg: record]: nothing -> list<path> {
let activation = match $pkg.type {
'module' => $'use ($pkg.name)'
'script' => {
Expand Down
2 changes: 1 addition & 1 deletion nupm/utils/registry.nu
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export def search-package [
package: string # Name of the package
--registry: string # Which registry to use (name or path)
--exact-match # Searched package name must match exactly
] -> table {
]: nothing -> table {
let registries = if (not ($registry | is-empty)) and ($registry in $env.NUPM_REGISTRIES) {
# If $registry is a valid column in $env.NUPM_REGISTRIES, use that
{ $registry : ($env.NUPM_REGISTRIES | get $registry) }
Expand Down

0 comments on commit a39fcce

Please sign in to comment.