zimfw / zimfw

Zim: Modular, customizable, and blazing fast Zsh framework
https://zimfw.sh
MIT License
3.8k stars 181 forks source link

install fails if git is present but not executable #533

Closed cluesch closed 5 months ago

cluesch commented 5 months ago

Prerequisites

Bug description

The installation fails if there is a git binary present, but the user does not have execution permission for it. Unlike the case where no git binary is present, where the installer switches to degit

Steps to reproduce

  1. cd ${$(mktemp -d):A} && \
       ZDOTDIR=${PWD} HOME=${PWD} ZIM_HOME=${PWD}/.zim && \
       curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh && \
       exec zsh
  2. Add more steps here ...

Current behavior

) Using Zsh version 5.9 ) ZIM_HOME not set, using the default one. ) Zsh is your default shell. ) Downloaded the Zim script to /tmp/mktemp.1cmj9lRz/.zim/zimfw.zsh ) Prepended Zim template to /tmp/mktemp.1cmj9lRz/.zimrc ) Prepended Zim template to /tmp/mktemp.1cmj9lRz/.zshrc x git: Error during git clone _zimfw_tool_git:7: permission denied: git

Expected behavior

Installer switches to degit

zimfw info

zimfw version:        1.13.0 (built at 2024-02-17 02:05:06 UTC, previous commit is 9de3984)
LANG:
OSTYPE:               netbsd
TERM:                 xterm
TERM_PROGRAM:
TERM_PROGRAM_VERSION:
ZIM_HOME:             /tmp/mktemp.1cmj9lRz/.zim
ZSH_VERSION:          5.9

Additional context

% id
uid=1337(cluesch) gid=100(users) groups=100(users)
% ls -l /usr/pkg/bin/git
-rwx---r-x  1 root  users  4017280 Oct 18  2023 /usr/pkg/bin/git
ericbn commented 5 months ago

Hi @cluesch. Thanks for reporting this!