Skip to content

.antigen/init.zsh has wrong antigen.zsh script location #650

Open
@TimJones

Description

@TimJones

Description

Antigen ignores real script location when generating cache.

Steps to reproduce

  1. Install antigen latest version
% curl -L https://github.com/zsh-users/antigen/releases/download/v2.2.3/antigen.zsh > ~/.antigen.zsh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   600    0   600    0     0    692      0 --:--:-- --:--:-- --:--:--   692
100 58907  100 58907    0     0  29995      0  0:00:01  0:00:01 --:--:--  183k
% echo "source ~/.antigen.zsh
antigen apply" >> ~/.zshrc

% zsh # Open a new interactive shell to invoke ~/.zshrc
% antigen version
antigen:source:2: no such file or directory: /home/tim/antigen.zsh
% grep -C2 "/home/tim/antigen.zsh" /home/tim/.antigen/init.zsh
antigen () {
  local MATCH MBEGIN MEND
  [[ "$ZSH_EVAL_CONTEXT" =~ "toplevel:*" || "$ZSH_EVAL_CONTEXT" =~ "cmdarg:*" ]] && source "/home/tim/antigen.zsh" && eval antigen $@;
  return 0;
}

Expected behavior:

Antigen caches the actual location of the initial script.

Software version

  • antigen version
Antigen v2.2.3 (ff391b5)
Revision date: 2018-01-02 13:19:57 +0100
  • zsh --version
zsh 5.1.1 (x86_64-ubuntu-linux-gnu)
  • uname -a
Linux Desktop-01 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux

Configuration

  • gist of .antigenrc N\A
  • gist of .zshrc N\A

More information

The bug seems to be here https://github.com/zsh-users/antigen/blob/develop/bin/antigen.zsh#L1833 as the location of the antigen-zsh script is hard-coded there during cache generation. I think it was only tested against a git-clone installation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions