File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -335,23 +335,17 @@ original_ghostty=$(cat "$MOCK_DOTFILES/.config/ghostty/config")
335335original_starship=$( cat " $MOCK_DOTFILES /.config/starship.toml" )
336336original_tmux=$( cat " $MOCK_DOTFILES /.tmux.conf" )
337337original_zellij=$( cat " $MOCK_DOTFILES /.config/zellij/config.kdl" )
338- # Make nvim plugins directory and files read-only so section 2 (Neovim) fails
339- # sed -i cannot write to read-only files or create temp files in read-only dirs
340- chmod 444 " $MOCK_DOTFILES /.config/nvim/lua/plugins/" * .lua 2> /dev/null || true
341- chmod 555 " $MOCK_DOTFILES /.config/nvim/lua/plugins"
338+ # Remove astroui.lua so sed -i fails on nonexistent file in section 2 (Neovim)
339+ rm -f " $MOCK_DOTFILES /.config/nvim/lua/plugins/astroui.lua"
342340
343341set +e; apply_theme " tokyo-night" " true" > /dev/null 2>&1 ; rc=$? ; set -e
344342
345343if [[ $rc -ne 0 ]]; then
346- pass " Apply returns non-zero when section fails "
344+ pass " Apply returns non-zero when required config is missing "
347345else
348- fail " Apply should return non-zero when nvim plugins dir is read-only "
346+ fail " Apply should return non-zero when astroui.lua is missing "
349347fi
350348
351- # Restore write permission for cleanup
352- chmod 755 " $MOCK_DOTFILES /.config/nvim/lua/plugins"
353- chmod 644 " $MOCK_DOTFILES /.config/nvim/lua/plugins/" * .lua 2> /dev/null || true
354-
355349# Verify all configs were rolled back to their original state
356350assert_eq " $( cat " $MOCK_DOTFILES /.config/ghostty/config" ) " " $original_ghostty " \
357351 " Ghostty config rolled back after failure"
You can’t perform that action at this time.
0 commit comments