topgrade-rs / topgrade

Upgrade all the things
GNU General Public License v3.0
2.07k stars 141 forks source link

Brew doesn't update during WSL step #522

Open RuiNtD opened 1 year ago

RuiNtD commented 1 year ago

Erroneous Behavior

When using topgrade from Windows, during the WSL step, the Brew and NPM (installed with Brew) steps within WSL are skipped.

Expected Behavior

Brew is updated, as well as any NPM packages.

Steps to reproduce

  1. WSL: Install Brew
  2. WSL: brew install node
  3. Windows: topgrade

Possible Cause (Optional)

The .profile (and maybe .bashrc?) aren't being executed.

Problem persists without calling from topgrade

Additional Details

Verbose Output (topgrade -v)

DEBUG Configuration at C:\Users\ethan\AppData\Roaming\topgrade.toml
DEBUG Loaded configuration: ConfigFile { include: None, misc: Some(Misc { pre_sudo: None, sudo_command: None, git_repos: None, predefined_git_repos: None, disable: None, 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, no_self_update: None }), pre_commands: Some({}), post_commands: None, commands: Some({}), python: Some(Python { enable_pip_review: None, enable_pip_review_local: None, enable_pipupgrade: None, pipupgrade_arguments: 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: None, garuda_update_arguments: None, trizen_arguments: None, pikaur_arguments: None, pamac_arguments: None, dnf_arguments: None, nix_arguments: None, apt_arguments: None, enable_tlmgr: None, redhat_distro_sync: None, suse_dup: None, rpm_ostree: None, emerge_sync_flags: None, emerge_update_flags: None, home_manager_arguments: None }), git: Some(Git { max_concurrency: None, arguments: None, repos: None, pull_predefined: None }), windows: Some(Windows { accept_all_updates: None, self_rename: None, open_remotes_in_new_terminal: None, enable_winget: None, wsl_update_pre_release: None, wsl_update_use_web_download: 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: Some(Distrobox { use_root: None, containers: None }) }
DEBUG Version: 12.0.2
DEBUG OS: x86_64-pc-windows-msvc
DEBUG Args { inner: ["C:\\Users\\ethan\\scoop\\apps\\topgrade\\current\\topgrade.exe", "--only", "wsl", "-v"] }
DEBUG Binary path: Ok("C:\\Users\\ethan\\scoop\\apps\\topgrade\\current\\topgrade.exe")
DEBUG Self Update: true
DEBUG Detected "C:\\Users\\ethan\\scoop\\shims\\git.EXE" as "git"
DEBUG Detected "C:\\Program Files\\PowerShell\\7\\pwsh.EXE" as "pwsh"
DEBUG Executing command `C:\Program Files\PowerShell\7\pwsh.EXE -NoProfile -Command 'Split-Path $profile'`
DEBUG Path "C:\\Users\\ethan\\Documents\\PowerShell" exists
DEBUG Path "C:\\Users\\ethan\\AppData\\Roaming\\.emacs.d" doesn't exist
DEBUG Cannot find "doas"
DEBUG Cannot find "please"
DEBUG Detected "C:\\Users\\ethan\\scoop\\shims\\sudo.CMD" as "sudo"

── 17:32:10 - Self update ──────────────────────────────────────────────────────
DEBUG starting new connection: https://api.github.com/
DEBUG resolving host="api.github.com"
DEBUG connecting to 140.82.112.5:443
DEBUG connected to 140.82.112.5:443
DEBUG No cached session for DnsName("api.github.com")
DEBUG Not resuming any session
DEBUG Using ciphersuite TLS13_AES_128_GCM_SHA256
DEBUG Not resuming
DEBUG TLS1.3 encrypted extensions: [ServerNameAck, Protocols([ProtocolName(6832)])]
DEBUG ALPN protocol is Some(b"h2")
DEBUG binding client connection
DEBUG client connection bound
DEBUG send frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384 }
DEBUG Connection{peer=Client}: new
DEBUG Connection{peer=Client}: send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }
DEBUG pooling idle connection for ("https", api.github.com)
DEBUG Connection{peer=Client}: send frame=Headers { stream_id: StreamId(1), flags: (0x5: END_HEADERS | END_STREAM) }
DEBUG Connection{peer=Client}: received frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 67108864, max_frame_size: 65536, enable_connect_protocol: 1 }
DEBUG Connection{peer=Client}: send frame=Settings { flags: (0x1: ACK) }
DEBUG Connection{peer=Client}: received frame=Settings { flags: (0x1: ACK) }
DEBUG Connection{peer=Client}: received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384 }
DEBUG Connection{peer=Client}: received frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
DEBUG Connection{peer=Client}: received frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
DEBUG Connection{peer=Client}: close
Topgrade is up-to-date
DEBUG Step "WSL"
DEBUG Detected "C:\\WINDOWS\\system32\\wsl.EXE" as "wsl"
DEBUG Detected "C:\\WINDOWS\\system32\\wsl.EXE" as "wsl"
DEBUG Executing command `C:\WINDOWS\system32\wsl.EXE --list -q`
DEBUG WSL distributions: ["Ubuntu", ""]
DEBUG Executing command `C:\WINDOWS\system32\wsl.EXE -d Ubuntu bash -lc 'which topgrade'`
DEBUG Executing command `C:\WINDOWS\system32\wsl.EXE -d Ubuntu bash -c 'TOPGRADE_PREFIX=Ubuntu exec /home/ethan/.cargo/bin/topgrade
'`

── (Ubuntu) 17:32:12 - System update ───────────────────────────────────────────
[sudo] password for ethan:
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB]
Fetched 226 kB in 1s (270 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libldap-2.5-0 libldap-common
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

── (Ubuntu) 17:32:20 - Flatpak User Packages ───────────────────────────────────

Note that the directories

'/var/lib/flatpak/exports/share'
'/home/ethan/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

Looking for updates…
Nothing to do.

── (Ubuntu) 17:32:20 - Flatpak System Packages ─────────────────────────────────

Note that the directories

'/var/lib/flatpak/exports/share'
'/home/ethan/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

Looking for updates…

New org.kde.dolphin permissions:
    fallback-x11

        ID                              Branch          Op          Remote          Download
 1. [✗] org.kde.dolphin.Locale          stable          u           flathub         1.0 kB / 6.1 MB
 4. [✗] org.kde.dolphin                 stable          u           flathub         1.0 kB / 30.8 MB

Warning: Failed to get revokefs-fuse socket from system-helper: Flatpak system operation GetRevokefsFd not allowed for user
Warning: Flatpak system operation Deploy not allowed for user
Warning: Failed to get revokefs-fuse socket from system-helper: Flatpak system operation GetRevokefsFd not allowed for user
Error: Flatpak system operation Deploy not allowed for user
Updates complete.
error: There were one or more errors
Flatpak failed:
   0: Command failed: `/usr/bin/flatpak update --system`
   1: `/usr/bin/flatpak` failed: exit status: 1

Location:
   /home/ethan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/topgrade-12.0.2/src/steps/os/linux.rs:803

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
(Ubuntu) Retry? (y)es/(N)o/(s)hell/(q)uit

── (Ubuntu) 17:33:12 - snap ────────────────────────────────────────────────────
All snaps up to date.

── (Ubuntu) 17:33:21 - Cargo ───────────────────────────────────────────────────
    Polling registry 'https://index.crates.io/'..

Package       Installed  Latest   Needs update
cargo-update  v13.0.4    v13.0.4  No
topgrade      v12.0.2    v12.0.2  No

No packages need updating.
Package  Installed  Latest  Needs update

No git packages need updating.
Overall updated 0 packages.

── (Ubuntu) 17:33:25 - pip3 ────────────────────────────────────────────────────
Requirement already satisfied: pip in /home/ethan/.local/lib/python3.10/site-packages (23.2.1)
DEPRECATION: distro-info 1.1build1 has a non-standard version number. pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of distro-info or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063

── (Ubuntu) 17:33:29 - Node Package Manager ────────────────────────────────────

── (Ubuntu) 17:33:33 - Performant Node Package Manager ─────────────────────────
pnpm failed:
   0: Command failed: `/mnt/c/Users/ethan/scoop/apps/nodejs/current/bin/pnpm root -g`

      Stderr:
      /mnt/c/Users/ethan/scoop/apps/nodejs/current/bin/pnpm: 11: exec: node: not found
   1: `/mnt/c/Users/ethan/scoop/apps/nodejs/current/bin/pnpm` failed: exit status: 127

Location:
   /home/ethan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/topgrade-12.0.2/src/steps/node.rs:80

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
(Ubuntu) Retry? (y)es/(N)o/(s)hell/(q)uit

── (Ubuntu) 17:35:51 - Summary ─────────────────────────────────────────────────
System update: OK
config-update: OK
Flatpak: FAILED
snap: OK
cargo: OK
pip3: OK
pnpm: FAILED
DEBUG Command failed: Err(
   0: Command failed: `C:\WINDOWS\system32\wsl.EXE -d Ubuntu bash -c 'TOPGRADE_PREFIX=Ubuntu exec /home/ethan/.cargo/bin/topgrade
      '`
   1: `C:\WINDOWS\system32\wsl.EXE` failed: exit code: 1

Location:
   src\steps\os\windows.rs:142

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.)
DEBUG Upgrading "Ubuntu": Err(
   0: Command failed: `C:\WINDOWS\system32\wsl.EXE -d Ubuntu bash -c 'TOPGRADE_PREFIX=Ubuntu exec /home/ethan/.cargo/bin/topgrade
      '`
   1: `C:\WINDOWS\system32\wsl.EXE` failed: exit code: 1

Location:
   src\steps\os\windows.rs:142

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.)
DEBUG Executing command `C:\WINDOWS\system32\wsl.EXE -d '' bash -lc 'which topgrade'`
DEBUG Command failed: Err(
   0: Command failed: `C:\WINDOWS\system32\wsl.EXE -d '' bash -lc 'which topgrade'`

      Stdout:
      There is no distribution with the supplied name.
      Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND

   1: `C:\WINDOWS\system32\wsl.EXE` failed: exit code: 0xffffffff

Location:
   src\steps\os\windows.rs:130

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.)
DEBUG Upgrading "": Err(
   0: Could not find Topgrade installed in WSL

Location:
   src\steps\os\windows.rs:128

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.)
DEBUG C:\Users\ethan\.ideavimrc does not exists
DEBUG C:\Users\ethan\.intellimacs does not exists
DEBUG Checking if \\?\C:\Users\ethan\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState is a git repository
DEBUG Transformed path to C:\Users\ethan\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
DEBUG Executing command `C:\Users\ethan\scoop\shims\git.EXE rev-parse --show-toplevel`
DEBUG Command failed: Err(
   0: Command failed: `C:\Users\ethan\scoop\shims\git.EXE rev-parse --show-toplevel`

      Stderr:
      fatal: not a git repository (or any of the parent directories): .git
   1: `C:\Users\ethan\scoop\shims\git.EXE` failed: exit code: 128

Location:
   src\steps\git.rs:166

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.)
DEBUG Startup link: Lnk { path: Some("C:\\Users\\ethan\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\ShareX.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_RELATIVE_PATH | HAS_WORKING_DIR | HAS_ARGUMENTS | IS_UNICODE, file_attributes: (empty), creation_time: 133315407136279662, access_time: 133339202399471929, write_time: 133185029620000000, file_size: 2198016, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2023-06-18T05:45:13.627Z), modified_on: Some(2023-01-18T08:09:22Z), accessed_on: Some(2023-07-15T18:43:59.947Z) }, string_data: StringData { name_string: None, relative_path: Some("..\\..\\..\\..\\..\\..\\..\\..\\..\\Program Files\\ShareX\\ShareX.exe"), working_dir: Some("C:\\Program Files\\ShareX"), command_line_arguments: Some("-silent"), icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 81, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 45, common_network_relative_link_offset: 0, common_path_suffix_offset: 80, local_base_path_offset_unicode: 17, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\\Program Files\\ShareX\\ShareX.exe"), common_network_relative_link: None, common_path_suffix: None, local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: Some(SpecialFolderDataBlock { block_size: 16, block_signature: 2684354565, special_folder_id: 38, offset: 185 }), console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 35654593837293220996228090693335016374, offset: 185 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 210, block_signature: 2684354569, property_store: [141, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 113, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 47, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 49, 0, 55, 0, 56, 0, 54, 0, 49, 0, 52, 0, 57, 0, 49, 0, 57, 0, 51, 0, 45, 0, 51, 0, 54, 0, 53, 0, 56, 0, 55, 0, 50, 0, 48, 0, 55, 0, 55, 0, 50, 0, 45, 0, 49, 0, 54, 0, 54, 0, 56, 0, 52, 0, 49, 0, 53, 0, 56, 0, 50, 0, 54, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 14, 255, 115, 148, 166, 37, 246, 77, 166, 46, 58, 14, 196, 237, 7, 66, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 7165276959250347109, droid: [120959524277736798440131753613068497902, 194187526485875794614778168935908359033], droid_birth: [120959524277736798440131753613068497902, 194187526485875794614778168935908359033] }), vista_and_above_idlist_props: None } }
DEBUG \\?\C:\Program Files\ShareX\ShareX.exe is a file. Checking \\?\C:\Program Files\ShareX
DEBUG Checking if \\?\C:\Program Files\ShareX is a git repository
DEBUG Transformed path to C:\Program Files\ShareX
DEBUG Executing command `C:\Users\ethan\scoop\shims\git.EXE rev-parse --show-toplevel`
DEBUG Command failed: Err(
   0: Command failed: `C:\Users\ethan\scoop\shims\git.EXE rev-parse --show-toplevel`

      Stderr:
      fatal: not a git repository (or any of the parent directories): .git
   1: `C:\Users\ethan\scoop\shims\git.EXE` failed: exit code: 128

Location:
   src\steps\git.rs:166

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.)
DEBUG Startup link: Lnk { path: Some("C:\\Users\\ethan\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\Sync Mods Folders.lnk"), header: ShellLinkHeader { header_size: 76, link_clsid: 93045959704944114645041356371858166785, link_flags: HAS_LINK_TARGET_ID_LIST | HAS_LINK_INFO | HAS_RELATIVE_PATH | HAS_WORKING_DIR | HAS_ARGUMENTS | IS_UNICODE | ENABLE_TARGET_METADATA, file_attributes: (empty), creation_time: 133348703413207487, access_time: 133348716334915689, write_time: 133344482700000000, file_size: 409864, icon_index: 0, show_command: SW_SHOWNORMAL, hot_key: HotKeyFlags { low_byte: 0, high_byte: 0 }, reserved1: 0, reserved2: 0, reserved3: 0, created_on: Some(2023-07-26T18:39:01.320Z), modified_on: Some(2023-07-21T21:24:30Z), accessed_on: Some(2023-07-26T19:00:33.491Z) }, string_data: StringData { name_string: None, relative_path: Some("..\\..\\..\\..\\..\\..\\..\\..\\..\\Program Files\\FreeFileSync\\RealTimeSync.exe"), working_dir: Some("C:\\Program Files\\FreeFileSync"), command_line_arguments: Some("\"C:\\Users\\ethan\\Syncthing\\Mods.ffs_batch\""), icon_location: None }, link_target_id_list: LinkTargetIdList, link_info: LinkInfo { link_info_size: 93, link_info_header_size: 28, link_info_flags: Some(VOLUME_ID_AND_LOCAL_BASE_PATH), volume_id_offset: 28, local_base_path_offset: 45, common_network_relative_link_offset: 0, common_path_suffix_offset: 92, local_base_path_offset_unicode: 17, common_path_suffix_offset_unicode: 3, volume_id: None, local_base_path: Some("C:\\Program Files\\FreeFileSync\\RealTimeSync.exe"), common_network_relative_link: None, common_path_suffix: None, local_base_path_unicode: None, common_path_suffix_unicode: None }, extra_data: ExtraData { darwin_props: None, special_folder_props: Some(SpecialFolderDataBlock { block_size: 16, block_signature: 2684354565, special_folder_id: 38, offset: 185 }), console_props: None, console_fe_props: None, environment_props: None, icon_environment_props: None, known_folder_props: Some(KnownFolderDataBlock { block_size: 28, block_signature: 2684354571, known_folder_id: 35654593837293220996228090693335016374, offset: 185 }), property_store_props: Some(PropertyStoreDataBlock { block_size: 645, block_signature: 2684354569, property_store: [109, 0, 0, 0, 49, 83, 80, 83, 237, 48, 189, 218, 67, 0, 137, 71, 167, 248, 208, 19, 164, 115, 102, 34, 81, 0, 0, 0, 100, 0, 0, 0, 0, 31, 0, 0, 0, 32, 0, 0, 0, 70, 0, 114, 0, 101, 0, 101, 0, 70, 0, 105, 0, 108, 0, 101, 0, 83, 0, 121, 0, 110, 0, 99, 0, 32, 0, 40, 0, 67, 0, 58, 0, 92, 0, 80, 0, 114, 0, 111, 0, 103, 0, 114, 0, 97, 0, 109, 0, 32, 0, 70, 0, 105, 0, 108, 0, 101, 0, 115, 0, 41, 0, 0, 0, 0, 0, 0, 0, 141, 0, 0, 0, 49, 83, 80, 83, 226, 138, 88, 70, 188, 76, 56, 67, 187, 252, 19, 147, 38, 152, 109, 206, 113, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 47, 0, 0, 0, 83, 0, 45, 0, 49, 0, 45, 0, 53, 0, 45, 0, 50, 0, 49, 0, 45, 0, 49, 0, 55, 0, 56, 0, 54, 0, 49, 0, 52, 0, 57, 0, 49, 0, 57, 0, 51, 0, 45, 0, 51, 0, 54, 0, 53, 0, 56, 0, 55, 0, 50, 0, 48, 0, 55, 0, 55, 0, 50, 0, 45, 0, 49, 0, 54, 0, 54, 0, 56, 0, 52, 0, 49, 0, 53, 0, 56, 0, 50, 0, 54, 0, 45, 0, 49, 0, 48, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, 49, 83, 80, 83, 48, 241, 37, 183, 239, 71, 26, 16, 165, 241, 2, 96, 140, 158, 235, 172, 53, 0, 0, 0, 10, 0, 0, 0, 0, 31, 0, 0, 0, 17, 0, 0, 0, 82, 0, 101, 0, 97, 0, 108, 0, 84, 0, 105, 0, 109, 0, 101, 0, 83, 0, 121, 0, 110, 0, 99, 0, 46, 0, 101, 0, 120, 0, 101, 0, 0, 0, 0, 0, 21, 0, 0, 0, 15, 0, 0, 0, 0, 64, 0, 0, 0, 0, 167, 155, 114, 240, 191, 217, 1, 21, 0, 0, 0, 12, 0, 0, 0, 0, 21, 0, 0, 0, 8, 65, 6, 0, 0, 0, 0, 0, 41, 0, 0, 0, 4, 0, 0, 0, 0, 31, 0, 0, 0, 12, 0, 0, 0, 65, 0, 112, 0, 112, 0, 108, 0, 105, 0, 99, 0, 97, 0, 116, 0, 105, 0, 111, 0, 110, 0, 0, 0, 21, 0, 0, 0, 14, 0, 0, 0, 0, 64, 0, 0, 0, 0, 123, 23, 188, 25, 188, 217, 1, 0, 0, 0, 0, 141, 0, 0, 0, 49, 83, 80, 83, 166, 106, 99, 40, 61, 149, 210, 17, 181, 214, 0, 192, 79, 217, 24, 208, 113, 0, 0, 0, 30, 0, 0, 0, 0, 31, 0, 0, 0, 47, 0, 0, 0, 67, 0, 58, 0, 92, 0, 80, 0, 114, 0, 111, 0, 103, 0, 114, 0, 97, 0, 109, 0, 32, 0, 70, 0, 105, 0, 108, 0, 101, 0, 115, 0, 92, 0, 70, 0, 114, 0, 101, 0, 101, 0, 70, 0, 105, 0, 108, 0, 101, 0, 83, 0, 121, 0, 110, 0, 99, 0, 92, 0, 82, 0, 101, 0, 97, 0, 108, 0, 84, 0, 105, 0, 109, 0, 101, 0, 83, 0, 121, 0, 110, 0, 99, 0, 46, 0, 101, 0, 120, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 49, 83, 80, 83, 177, 22, 109, 68, 173, 141, 112, 72, 167, 72, 64, 46, 164, 61, 120, 140, 29, 0, 0, 0, 104, 0, 0, 0, 0, 72, 0, 0, 0, 14, 255, 115, 148, 166, 37, 246, 77, 166, 46, 58, 14, 196, 237, 7, 66, 0, 0, 0, 0, 0, 0, 0, 0] }), shim_props: None, tracker_props: Some(TrackerDataBlock { block_size: 96, block_signature: 2684354563, length: 88, version: 0, machine_id: 7165276959250347109, droid: [120959524277736798440131753613068497902, 194187526485875898506840826112980496409], droid_birth: [120959524277736798440131753613068497902, 194187526485875898506840826112980496409] }), vista_and_above_idlist_props: None } }
DEBUG \\?\C:\Program Files\FreeFileSync\RealTimeSync.exe is a file. Checking \\?\C:\Program Files\FreeFileSync
DEBUG Checking if \\?\C:\Program Files\FreeFileSync is a git repository
DEBUG Transformed path to C:\Program Files\FreeFileSync
DEBUG Executing command `C:\Users\ethan\scoop\shims\git.EXE rev-parse --show-toplevel`
DEBUG Command failed: Err(
   0: Command failed: `C:\Users\ethan\scoop\shims\git.EXE rev-parse --show-toplevel`

      Stderr:
      fatal: not a git repository (or any of the parent directories): .git
   1: `C:\Users\ethan\scoop\shims\git.EXE` failed: exit code: 128

Location:
   src\steps\git.rs:166

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.)
DEBUG Checking if \\?\C:\Users\ethan\Documents\PowerShell is a git repository
DEBUG Transformed path to C:\Users\ethan\Documents\PowerShell
DEBUG Executing command `C:\Users\ethan\scoop\shims\git.EXE rev-parse --show-toplevel`
DEBUG Command failed: Err(
   0: Command failed: `C:\Users\ethan\scoop\shims\git.EXE rev-parse --show-toplevel`

      Stderr:
      fatal: not a git repository (or any of the parent directories): .git
   1: `C:\Users\ethan\scoop\shims\git.EXE` failed: exit code: 128

Location:
   src\steps\git.rs:166

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.)

── 17:35:51 - Summary ──────────────────────────────────────────────────────────
WSL: OK
DEBUG Desktop notification: Topgrade finished successfully
SteveLauC commented 1 year ago

Does it work if you run topgrade inside the WSL?

RuiNtD commented 1 year ago

Yeah, it does.

SteveLauC commented 1 year ago

The .profile (and maybe .bashrc?) aren't being executed.

Then I guess your judgment is right, the shell rc file is not being sourced, maybe WSL spawns a login shell or something, will debug this when I have time

glsee commented 1 year ago

Same goes to rustup, flutter, npm etc. installed in WSL that topgrade supposedly supports. But the issue with Homebrew seems a bit different from the rest. When running topgrade within WSL itself, it still fails, whereas others are updated as expected when running topgrade directly inside WSL (except for gcloud CLI in my case).

When running topgrade from my Windows host, the upgrade summary for WSL portion is:

―― (Ubuntu) 19:11:03 - Summary ―――――――――――――――――――――――――――――――――――――――――――――――――
System update: OK
config-update: OK
yadm: OK
pip3: OK
gcloud: FAILED
snap: OK
Restarts: OK

(Unrelated or separate issue: gcloud installed via the official shell script keeps having issues to be updated for some reasons.)

When running topgrade inside WSL itself, here's the summary:

―― 19:10:24 - Summary ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
System update: OK
config-update: OK
Brew: FAILED
yadm: OK
rustup: OK
Flutter: OK
pip3: OK
npm: OK
gcloud: OK
GitHub CLI Extensions: OK
snap: OK
Restarts: OK

Here is the output for Homebrew section when running topgrade in WSL (I had to issue CTRL+C to interrupt it from being seemingly stuck):

―― 19:08:25 - Brew ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
fatal: couldn't find remote ref refs/heads/master
^C
Retry? (y)es/(N)o/(s)hell/(q)uit
SteveLauC commented 1 year ago

But the issue with Homebrew seems a bit different from the rest. When running top grade within WSL itself, it still fails,

Kinda think this is another issue, mind opening an issue for this?

glsee commented 1 year ago

But the issue with Homebrew seems a bit different from the rest. When running top grade within WSL itself, it still fails,

Kinda think this is another issue, mind opening an issue for this?

Created #563