Oh-my-fish: Failing to Install

Created on 18 Mar 2020  ·  7Comments  ·  Source: oh-my-fish/oh-my-fish

When I try to install omf it claims it succeeds successfully, but this error is printed in console:

curl -L https://get.oh-my.fish | fish
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   194  100   194    0     0    326      0 --:--:-- --:--:-- --:--:--   325
100 19042  100 19042    0     0  24319      0 --:--:-- --:--:-- --:--:-- 24319
Checking for a sane environment...
Installing Oh My Fish to /home/neil/.local/share/omf...
Using release channel "stable".
Cloning master from https://github.com/oh-my-fish/oh-my-fish.git...
Writing bootstrap to /home/neil/.config/fish/conf.d/omf.fish...
Setting up Oh My Fish configuration...
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package default
~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish (line 11): Expected a string, but instead found a '&'
    if not grep $record $bundle > /dev/null ^&1
                                             ^
from sourcing file ~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish
    called on line 1 of file ~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish
in command substitution
    called on line 53 of file ~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish
in function 'omf.packages.install' with arguments 'default'
    called on line 22 of file ~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.install.fish
in function 'omf.bundle.install'
    called on line 9 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.install.fish
in function 'omf.cli.install'
    called on line 2 of file -
in function '__omf_last_command'
    called on line 50 of file ~/.local/share/omf/pkg/omf/functions/omf.fish
in function 'omf' with arguments 'install'
source: Error while reading file “/home/neil/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish”
fish: Unknown command: omf.bundle.add
~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish (line 53): 
    omf.bundle.add theme $name_or_url
    ^
in function 'omf.packages.install' with arguments 'default'
    called on line 22 of file ~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.install.fish
in function 'omf.bundle.install'
    called on line 9 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.install.fish
in function 'omf.cli.install'
    called on line 2 of file -
in function '__omf_last_command'
    called on line 50 of file ~/.local/share/omf/pkg/omf/functions/omf.fish
in function 'omf' with arguments 'install'
✔ default successfully installed.
Installation successful!

The output of omf doctor after this install is:

omf doctor                                                        14:38:45
Oh My Fish version:   6
OS type:              Linux
Fish version:         fish, version 3.1.0
Git version:          git version 2.25.1
Git core.autocrlf:    no
Your shell is ready to swim.

Furthermore, if I try to uninstall omf after this install it fails like so:

omf destroy                                                       14:41:14
~/.local/share/omf/bin/install (line 453): Expected a string, but instead found a '&'
  command fish -c "omf --version" > /dev/null ^&1
                                               ^
<W> fish: Error while reading file /home/neil/.local/share/omf/bin/install

I'm on Arch Linux kernel 5.5.9-arch1-2, and my shell is fish. Any help is appreciated.

Most helpful comment

I think your issue is related to this issue: https://github.com/oh-my-fish/oh-my-fish/issues/609

The issue was fixed but the installation with curl is trying to install the latest stable version of (version 6) and that version doesn't have the fix. Installing oh-my-fish using the git sources should work without any issue.

Here are the instructions from the README.md.

# with git
$ git clone https://github.com/oh-my-fish/oh-my-fish
$ cd oh-my-fish
$ bin/install --offline

There are several reports of this in this repo so I'm a bit worried about the status of this project. The problem was fixed over a year ago. Why was this not released yet ?

All 7 comments

I think your issue is related to this issue: https://github.com/oh-my-fish/oh-my-fish/issues/609

The issue was fixed but the installation with curl is trying to install the latest stable version of (version 6) and that version doesn't have the fix. Installing oh-my-fish using the git sources should work without any issue.

Here are the instructions from the README.md.

# with git
$ git clone https://github.com/oh-my-fish/oh-my-fish
$ cd oh-my-fish
$ bin/install --offline

There are several reports of this in this repo so I'm a bit worried about the status of this project. The problem was fixed over a year ago. Why was this not released yet ?

Thank you @gattazr. That worked, sorry should have checked the Issue Tracker.

As a follow-up, while installing this from git worked, the same error happens when I attempt to install packages, eg:

➤ omf install bang-bang                                                                                                                                                                                  20:49:31
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package bang-bang
~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish (line 11): Expected a string, but instead found a '&'
    if not grep $record $bundle > /dev/null ^&1
                                             ^
from sourcing file ~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish
    called on line 1 of file ~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish
in command substitution
    called on line 55 of file ~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish
in function 'omf.packages.install' with arguments 'bang-bang'
    called on line 13 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.install.fish
in function 'omf.cli.install' with arguments 'bang-bang'
    called on line 2 of file -
in function '__omf_last_command' with arguments 'bang-bang'
    called on line 50 of file ~/.local/share/omf/pkg/omf/functions/omf.fish
in function 'omf' with arguments 'install bang-bang'
source: Error while reading file “/home/neil/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish”
fish: Unknown command: omf.bundle.add
~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish (line 55): 
    omf.bundle.add package $name_or_url
    ^
in function 'omf.packages.install' with arguments 'bang-bang'
    called on line 13 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.install.fish
in function 'omf.cli.install' with arguments 'bang-bang'
    called on line 2 of file -
in function '__omf_last_command' with arguments 'bang-bang'
    called on line 50 of file ~/.local/share/omf/pkg/omf/functions/omf.fish
in function 'omf' with arguments 'install bang-bang'
✔ bang-bang successfully installed.

@NeilResnik Are you sure that the reinstall removed the previous installation you had ? What do you have when you run omf version ? It should return this:

Oh My Fish version 6-47-g6adc397

Running this to ensure you are using the dev channel and the latest version could help.

omf channel dev
omf update

And it fails to uninstall too when you run the command again. It never waits on read and just exists.

Anyway to fix this?

⋊> ~ curl -L https://get.oh-my.fish | fish                              15:08:29
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                                                                                                Dload  Upload   Total   Spent    Left  Speed
100   194  100   194    0     0   1154      0 --:--:-- --:--:-- --:--:--  1154
100 19042  100 19042    0     0  47486      0 --:--:-- --:--:-- --:--:-- 47486
                                                                              Checking for a sane environment...
                                Existing installation detected at /Users/<usename>/.local/share/omf
                      Would you like to remove the existing installation? (y/N): ⏎                                                                              read> 
      ⏎                                                                         ⋊> ~

@gattazr Switching to the dev channel fixed the issue. Thank you again.

Any plans to, you know, actually release the fix?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edoarda picture edoarda  ·  7Comments

adgai19 picture adgai19  ·  3Comments

Joe23232 picture Joe23232  ·  4Comments

onmyway133 picture onmyway133  ·  7Comments

98thpixel picture 98thpixel  ·  7Comments