mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-18 19:05:57 +00:00
fix: improve shell detection, curl flags, and cleanup robustness
- Use ZSH_VERSION instead of ZSH_NAME for reliable zsh detection - Document NVIM_* env vars as optional external overrides - Add -fsSL flags to curl for mise bootstrap - Consolidate duplicate shellcheck directives in install-fonts.sh - Add explicit return 0 to cleanup script helper functions - Add actionable remediation to uv-not-found error message
This commit is contained in:
@@ -347,7 +347,8 @@ export AWS_CONFIGURE_SESSION_MFA=true
|
||||
msg "Setting up Mason configuration"
|
||||
export MASON_HOME="$XDG_DATA_HOME/nvim/mason"
|
||||
|
||||
# Neovim environment variables
|
||||
# Neovim environment variables — optional overrides for external tools.
|
||||
# Neovim itself uses vim.fn.stdpath() and does not read these.
|
||||
msg "Setting up Neovim configuration"
|
||||
[ -z "${NVIM_STATE:-}" ] && export NVIM_STATE="$XDG_STATE_HOME/nvim"
|
||||
[ -z "${NVIM_CONFIG_HOME:-}" ] && export NVIM_CONFIG_HOME="$XDG_CONFIG_HOME/nvim"
|
||||
@@ -503,7 +504,7 @@ export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history"
|
||||
# mise — unified tool version manager
|
||||
# https://mise.jdx.dev
|
||||
if command -v mise &> /dev/null; then
|
||||
if [ -n "${ZSH_NAME:-}" ]; then
|
||||
if [ -n "${ZSH_VERSION:-}" ]; then
|
||||
eval "$(mise activate zsh)"
|
||||
else
|
||||
eval "$(mise activate bash)"
|
||||
|
||||
@@ -168,7 +168,7 @@ section_install()
|
||||
msgr run "Installing tools via mise..."
|
||||
if ! command -v mise &> /dev/null; then
|
||||
msgr nested "Installing mise..."
|
||||
if ! curl https://mise.run | sh; then
|
||||
if ! curl -fsSL https://mise.run | sh; then
|
||||
msgr err "Failed to install mise"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -37,6 +37,7 @@ remove_dir()
|
||||
else
|
||||
msgr ok "$label not found (already clean): $dir"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
remove_file()
|
||||
@@ -51,6 +52,7 @@ remove_file()
|
||||
msgr run_done "Removed $label: $file"
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
msgr msg "Cleaning up old version manager installations..."
|
||||
|
||||
@@ -51,7 +51,6 @@ install_fonts()
|
||||
{
|
||||
msgr run "Starting to install NerdFonts..."
|
||||
# shellcheck disable=SC2048,SC2086
|
||||
# shellcheck disable=SC2086
|
||||
./install.sh -q -s ${fonts[*]} \
|
||||
&& msgr run_done "Done"
|
||||
return 0
|
||||
|
||||
@@ -9,7 +9,7 @@ msgr run "Starting to install Python libraries"
|
||||
|
||||
# Ensure uv is available
|
||||
if ! command -v uv &> /dev/null; then
|
||||
msgr err "uv not found — install it via mise first"
|
||||
msgr err "uv not found — install it via mise first (run: dfm install mise)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user