Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix disable_auto_update #34

Merged
merged 1 commit into from Oct 28, 2022

Conversation

anthonysomerset
Copy link

@anthonysomerset anthonysomerset commented Oct 27, 2022

DISABLE_AUTO_UPDATE needs to go before the sourcing of the oh-my-zsh script to work - by default it gets appended to the end of .zshrc and has no effect so user still gets prompted for update

Note file_line can't MOVE a line once its present so this will have no effect on existing installs - to resolve, users will need to manually remove DISABLE_AUTO_UPDATE line that gets appended to end of file, then the next puppet run will put it back in the correct location.

there is probably a better more complex way of doing this by using class parameters and updating the actual template erb based on that parameter but this provided least change towards a fix

DISABLE_AUTO_UPDATE needs to go before the sourcing of the oh-my-zsh script to work - by default it gets appended to the end of .zshrc and has no effect
@anthonysomerset
Copy link
Author

it should be added - users will only notice this buggy behaviour if they are setting DISABLE_AUTO_UPDATE to true to disable the prompt, the default behaviour has this set to false and this is the default behaviour of oh-my-zsh even if undefined

@anthonysomerset
Copy link
Author

@anthonysomerset
Copy link
Author

on some of my hosts - the line is in the correct place and gets updated - oddly on a few hosts it was appending to the end....
it looks like the line was removed at some point and replaced with text like this

# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled  # disable automatic updates
# zstyle ':omz:update' mode auto      # update automatically without asking
# zstyle ':omz:update' mode reminder  # just remind me to update when it's time

i am not sure where that is coming from but i don't believe this is specifically a issue of this module - but this PR at least makes the config entry "safe" in that if its not present it will get installed in the correct place pending replacing the config with the correct changed config

@rehanone rehanone merged commit 902144c into rehanone:master Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants