Closed arctic-penguin closed 1 year ago
Hmm, the npm and pnpm steps call NPM::upgrade
, which does print a separator:
dev
branch), showing the separatorsDo you have log output or anything? Definitely curious about this.
I had an issue with pnpm and npm on my machine which I have now ironed out. Cannot reproduce anymore. Thanks for the quick reply!
Disregard, I can still reproduce it. Branch dev
.
$ cargo r -- --only node
Compiling topgrade v10.1.2 (/home/xxxxxxxx/tmp/topgrade)
Finished dev [unoptimized + debuginfo] target(s) in 5.36s
Running `target/debug/topgrade --only node`
―― 17:36:04 - dotfiles ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Already up to date.
Retry? (y)es/(N)o/(s)hell/(q)uit
With a notifaction that pnpm is was the culprit.
With the verbose flag this reads like this.
$ cargo r -- --only node --verbose
Finished dev [unoptimized + debuginfo] target(s) in 0.08s
Running `target/debug/topgrade --only node --verbose`
2022-11-10T16:38:29.077Z DEBUG topgrade::config > Configuration at /home/xxxxxxxx/.config/topgrade.toml
2022-11-10T16:38:29.078Z DEBUG topgrade::config > Path ~/.config/cheat/cheatsheets/personal expanded to /home/xxxxxxxx/.config/cheat/cheatsheets/personal
2022-11-10T16:38:29.078Z DEBUG topgrade::config > Loaded configuration: ConfigFile { pre_commands: Some({"dotfiles": "cd ~/dotfiles && git pull && ./setup.py"}), post_commands: None, commands: Some({}), git_repos: None, predefined_git_repos: None, disable: Some([Vim]), ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, git_arguments: None, tmux_arguments: None, set_title: None, display_time: None, assume_yes: None, yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, accept_all_windows_updates: None, skip_notify: None, bashit_branch: None, only: None, composer: Some(Composer { self_update: None }), brew: Some(Brew { greedy_cask: None, autoremove: None }), linux: Some(Linux { yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, arch_package_manager: None, show_arch_news: Some(false), trizen_arguments: None, pikaur_arguments: None, pamac_arguments: None, dnf_arguments: None, apt_arguments: None, enable_tlmgr: Some(true), redhat_distro_sync: None, rpm_ostree: None, emerge_sync_flags: None, emerge_update_flags: None }), git: Some(Git { max_concurrency: Some(1), arguments: None, repos: Some(["/home/xxxxxxxx/.config/cheat/cheatsheets/personal"]), pull_predefined: Some(false) }), windows: Some(Windows { accept_all_updates: None, self_rename: None, open_remotes_in_new_terminal: None, enable_winget: None }), npm: Some(NPM { use_sudo: None }), yarn: None, vim: None, firmware: Some(Firmware { upgrade: None }), vagrant: None, flatpak: Some(Flatpak { use_sudo: None }), distrobox: None }
2022-11-10T16:38:29.078Z DEBUG topgrade::utils > Detected "/usr/bin/notify-send" as "notify-send"
2022-11-10T16:38:29.078Z DEBUG topgrade > Version: 10.1.2
2022-11-10T16:38:29.078Z DEBUG topgrade > OS: x86_64-unknown-linux-gnu
2022-11-10T16:38:29.078Z DEBUG topgrade > Args { inner: ["target/debug/topgrade", "--only", "node", "--verbose"] }
2022-11-10T16:38:29.078Z DEBUG topgrade > Binary path: Ok("/home/xxxxxxxx/tmp/topgrade/target/debug/topgrade")
2022-11-10T16:38:29.078Z DEBUG topgrade > Self Update: false
2022-11-10T16:38:29.078Z DEBUG topgrade::utils > Detected "/usr/bin/git" as "git"
2022-11-10T16:38:29.078Z DEBUG topgrade::utils > Cannot find "doas"
2022-11-10T16:38:29.078Z DEBUG topgrade::utils > Detected "/usr/bin/sudo" as "sudo"
―― 17:38:29 - dotfiles ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――
2022-11-10T16:38:29.078Z DEBUG topgrade::command > Executing command `/usr/bin/zsh -c 'cd ~/dotfiles && git pull && ./setup.py'`
Already up to date.
2022-11-10T16:38:43.412Z DEBUG topgrade::utils > Cannot find "pwsh"
2022-11-10T16:38:43.412Z DEBUG topgrade::utils > Cannot find "powershell"
2022-11-10T16:38:43.413Z DEBUG topgrade::utils > Path "/home/xxxxxxxx/.config/emacs" doesn't exist
2022-11-10T16:38:43.413Z DEBUG topgrade::utils > Path "/home/xxxxxxxx/.emacs.d" doesn't exist
2022-11-10T16:38:43.413Z DEBUG topgrade::runner > Step "npm"
2022-11-10T16:38:43.413Z DEBUG topgrade::runner > Step "yarn"
2022-11-10T16:38:43.413Z DEBUG topgrade::utils > Detected "/usr/bin/yarn" as "yarn"
2022-11-10T16:38:43.413Z DEBUG topgrade::utils > Detected "/usr/bin/yarn" as "yarn"
2022-11-10T16:38:43.413Z DEBUG topgrade::command > Executing command `/usr/bin/yarn --version`
2022-11-10T16:38:43.614Z DEBUG topgrade::command > Executing command `/usr/bin/yarn global dir`
2022-11-10T16:38:43.823Z DEBUG topgrade::runner > Step "pnpm"
2022-11-10T16:38:43.823Z DEBUG topgrade::utils > Detected "/usr/bin/pnpm" as "pnpm"
2022-11-10T16:38:43.823Z DEBUG topgrade::command > Executing command `/usr/bin/pnpm --version`
2022-11-10T16:38:43.825Z DEBUG topgrade::command > Executing command `/usr/bin/pnpm root -g`
2022-11-10T16:38:43.826Z DEBUG topgrade::runner > Step "pnpm" failed: Failed to execute `/usr/bin/pnpm root -g`
Caused by:
Exec format error (os error 8)
2022-11-10T16:38:43.826Z DEBUG topgrade::terminal > Desktop notification: pnpm failed
2022-11-10T16:38:43.826Z DEBUG topgrade::command > Executing command `/usr/bin/notify-send -a Topgrade Topgrade 'pnpm failed'`
Retry? (y)es/(N)o/(s)hell/(q)uit
I have two fixes for this! One, in #170, moves the separators to the correct place, so that the banner will be printed before the command that failed. The second, in #171, prints detailed error messages when commands fail; this would have made it clear exactly what program failed and what it had to say, even before running in debug-mode.
I think we can close this now that #170 and #171 are merged.
For example:
When these steps are executed, there isn't necessarily an indication something gets executed. In my case the previous step was
pip
, which ran successfully, then topgrade asked me if I wanted to try again, and the desktop notification indicated that the steppnpm
had failed.Additional Details
git clone; cargo run