Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic after refusing to install dependencies #38

Closed
elder-n00b opened this issue Jan 28, 2022 · 1 comment
Closed

panic after refusing to install dependencies #38

elder-n00b opened this issue Jan 28, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@elder-n00b
Copy link

Are you on latest version of yup?

Yes (yup-bin 1.1.7-1)

Steps to Reproduce the Problem

  1. yup dotbare, install
  2. refuse installing ruby (Numbers of packages not to install? (eg: 1 2 3, 1-3 or ^4): 1)
  3. refuse installing ruby-rdoc rubygems (Numbers of packages not to install? (eg: 1 2 3, 1-3 or ^4): 1 2 or 1-2)
  4. slice bounds out of range

Other Details

yup dotbare
[...removed for brevity...]
==> View, see Diffs or Edit the PKGBUILD? (All or None):
==> Checking for dependencies
==> Found uninstalled Dependencies:
    1 ruby
==> Numbers of packages not to install? (eg: 1 2 3, 1-3 or ^4): 1
==> Found uninstalled Make Dependencies:
    1 ruby-rdoc  2 rubygems
==> Numbers of packages not to install? (eg: 1 2 3, 1-3 or ^4): 1-2
panic: runtime error: slice bounds out of range [2:1]

goroutine 1 [running]:
github.com/ericm/yup/sync.ParseNumbersDep({0xc00041c98c, 0xc000010018}, 0xc0004eae78)
	/home/eric/yup/sync/sync.go:232 +0x2cd
github.com/ericm/yup/sync.(*PkgBuild).Install(0xc00010c630, 0x0, 0x0)
	/home/eric/yup/sync/sync.go:458 +0x149d
github.com/ericm/yup/sync.Sync({0xc0004eb4e0, 0x1, 0x0}, 0x1, 0x0)
	/home/eric/yup/sync/sync.go:99 +0x1c5
github.com/ericm/yup/search.SortPacks({0x7ffe02d3f929, 0xc000095cb0}, {0xc00012c2c0, 0x1, 0x1})
	/home/eric/yup/search/search.go:475 +0x4bb
github.com/ericm/yup/cmd.(*Arguments).getActions(0x901a60)
	/home/eric/yup/cmd/cmd.go:222 +0x1379
github.com/ericm/yup/cmd.Execute()
	/home/eric/yup/cmd/cmd.go:102 +0x15f
main.main()
	/home/eric/yup/main.go:42 +0xef

newPacks = append(newPacks[:i], newPacks[i+1:]...)

I have not tried with other packages but looks like it's unrelated. By the way those Ruby dependencies are optional for this package:

depends=('fzf')
optdepends=(
    'tree: Provide a directory tree view when finding directory'
    'bat: Syntax highlighting when previewing files'
    'highlight: Syntax highlighting when previewing files'
    'ruby-coderay: Syntax highlighting when previewing files'       # <==
    'git-delta: Fancy git diff preview'
    'diff-so-fancy: Fancy git diff preview')

and fzf, tree, bat, git-delta were already installed.

P.S. nice work, I love TUI programs. Page up/down would be nice to have while I'm at it.

@ericm ericm added the bug Something isn't working label Jan 28, 2022
@ericm ericm self-assigned this Jan 28, 2022
ericm added a commit that referenced this issue Jan 28, 2022
@ericm
Copy link
Owner

ericm commented Jan 28, 2022

Fix should be pushed in next release.

@ericm ericm closed this as completed Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants