topgrade icon indicating copy to clipboard operation
topgrade copied to clipboard

auto exit topgrade after completing with tmux option

Open ket000 opened this issue 3 years ago • 5 comments

I run tmux with below option.

tmux -y -t

At the end I get below option

(R)eboot (S)hell (Q)uit

Is it possible to add an option to quit automatically after the update and write the updates to a log file. This can then be used to run using cron job.

ket000 avatar Oct 27 '22 17:10 ket000

I run tmux with below option.

tmux -y -t Just looked it up and it's nowhere in the man pages what do those flags do. Even if they aren't relevant I'm still interested in them.

Is it possible to add an option to quit automatically after the update and write the updates to a log file. This can then be used to run using cron job.

Just to make sure, you mean quit topgrade automatically after an update so that this would be a possible process: cron-job runs topgrade -> topgrade exits automatically with exit code -> cron does it job with exit codes etc. Because if that's the case there is a feature, which needs documentation tbh, I also found out that it exists now, there is an option called keep_at_end=bool which disables the options in the end

s34m avatar Oct 27 '22 22:10 s34m

I meant topgrade -y -t to automatically exit once it is done. So you are saying, if i use below it will work

topgrade -y -t keep_at_end=true

currently i get R - Reboot S - Shell Q - Quit

ket000 avatar Oct 27 '22 23:10 ket000

You can create a ~~config.toml~~ topgrade.toml file as described in the readme. If you put in the option keep_at_end=false the message won't show up again.

s34m avatar Oct 28 '22 07:10 s34m

Getting this message after adding below to .config/topgrade.html

head .config/topgrade.toml keep_at_end = false

Don't ask for confirmations

#assume_yes = true

2022-10-28T22:15:05.736Z ERROR topgrade::config > Failed to deserialize /home/xxx/.config/topgrade.toml 2022-10-28T22:15:05.736Z ERROR topgrade::config > failed to load configuration: unknown field keep_at_end, expected one of pre_commands, post_commands, commands, git_repos, predefined_git_repos, disable, ignore_failures, remote_topgrades, remote_topgrade_path, ssh_arguments, git_arguments, tmux_arguments, set_title, display_time, assume_yes, yay_arguments, aura_aur_arguments, aura_pacman_arguments, no_retry, run_in_tmux, cleanup, notify_each_step, accept_all_windows_updates, skip_notify, bashit_branch, only, composer, brew, linux, git, windows, npm, yarn, vim, firmware, vagrant, flatpak at line 102 column 1

ket000 avatar Oct 28 '22 22:10 ket000

I'll try to figure out the problem. Shouldn't be that hard.

s34m avatar Oct 28 '22 23:10 s34m