Getting rust-related error in fish konsole

So I recently installed rust, now it's giving me this error on fish konsole which really ruins the aesthetic
~/.cargo/env (line 4): 'case' builtin not inside of switch block
case ":${PATH}:" in
^
from sourcing file ~/.cargo/env
called on line 8 of file ~/.profile
from sourcing file ~/.profile
called on line 14 of file ~/.config/fish/config.fish
from sourcing file ~/.config/fish/config.fish
called during startup
.: Error while reading file “/home/lasergangers/.cargo/env”

For reference, check this image : rust - Album on Imgur

Here is my inxi -Fza

System:    Kernel: 5.12.14-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0 
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=49625f3d-7b2f-421f-be21-c6403b8b81f9 
rw [email protected] quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 
systemd.unified_cgroup_hierarchy=1 loglevel=3 
Desktop: KDE Plasma 5.22.2 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM 
Distro: Garuda Linux base: Arch Linux 
Machine:   Type: Desktop Mobo: MSI model: B350M GAMING PRO (MS-7A39) v: 1.0 serial: <filter> 
UEFI-[Legacy]: American Megatrends v: 2.F0 date: 03/19/2018 
CPU:       Info: 6-Core model: AMD Ryzen 5 2600 bits: 64 type: MT MCP arch: Zen+ family: 17 (23) 
model-id: 8 stepping: 2 microcode: 800820D cache: L2: 3 MiB 
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 81590 
Speed: 3411 MHz min/max: 1550/3600 MHz boost: disabled Core speeds (MHz): 1: 3411 2: 3334 
3: 3355 4: 3379 5: 3354 6: 2984 7: 2725 8: 2978 9: 2725 10: 3332 11: 3281 12: 3212 
Vulnerabilities: Type: itlb_multihit status: Not affected 
Type: l1tf status: Not affected 
Type: mds status: Not affected 
Type: meltdown status: Not affected 
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
Type: spectre_v2 
mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling 
Type: srbds status: Not affected 
Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] driver: nvidia v: 465.31 
alternate: nouveau,nvidia_drm bus-ID: 1f:00.0 chip-ID: 10de:1c82 class-ID: 0300 
Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: nvidia display-ID: :0 
screens: 1 
Screen-1: 0 s-res: 1920x1080 s-dpi: 93 s-size: 524x292mm (20.6x11.5") s-diag: 600mm (23.6") 
Monitor-1: HDMI-0 res: 1920x1080 hz: 60 dpi: 94 size: 521x293mm (20.5x11.5") 
diag: 598mm (23.5") 
OpenGL: renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 465.31 
direct render: Yes 
Audio:     Device-1: NVIDIA GP107GL High Definition Audio driver: snd_hda_intel v: kernel bus-ID: 1f:00.1 
chip-ID: 10de:0fb9 class-ID: 0403 
Device-2: AMD Family 17h HD Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel 
bus-ID: 21:00.3 chip-ID: 1022:1457 class-ID: 0403 
Device-3: Razer USA Nari Ultimate type: USB driver: hid-generic,snd-usb-audio,usbhid 
bus-ID: 1-3:2 chip-ID: 1532:051a class-ID: 0300 
Sound Server-1: ALSA v: k5.12.14-zen1-1-zen running: yes 
Sound Server-2: JACK v: 0.125.0 running: no 
Sound Server-3: PulseAudio v: 14.2 running: no 
Sound Server-4: PipeWire v: 0.3.31 running: yes 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI 
driver: r8169 v: kernel port: e000 bus-ID: 1b:00.0 chip-ID: 10ec:8168 class-ID: 0200 
IF: enp27s0 state: down mac: <filter> 
Device-2: Realtek RTL8188EE Wireless Network Adapter driver: rtl8188ee v: kernel port: d000 
bus-ID: 1c:00.0 chip-ID: 10ec:8179 class-ID: 0280 
IF: wlp28s0 state: up mac: <filter> 
Drives:    Local Storage: total: 238.47 GiB used: 21.71 GiB (9.1%) 
SMART Message: Unable to run smartctl. Root privileges required. 
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: MidasForce model: SSD 256GB size: 238.47 GiB 
block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 rotation: SSD 
serial: <filter> rev: S1111A0L scheme: MBR 
Partition: ID-1: / raw-size: 101.75 GiB size: 101.75 GiB (100.00%) used: 21.71 GiB (21.3%) fs: btrfs 
dev: /dev/nvme0n1p3 maj-min: 259:3
ID-2: /home raw-size: 101.75 GiB size: 101.75 GiB (100.00%) used: 21.71 GiB (21.3%) fs: btrfs
dev: /dev/nvme0n1p3 maj-min: 259:3
ID-3: /var/log raw-size: 101.75 GiB size: 101.75 GiB (100.00%) used: 21.71 GiB (21.3%)
fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
ID-4: /var/tmp raw-size: 101.75 GiB size: 101.75 GiB (100.00%) used: 21.71 GiB (21.3%)
fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
Swap:      Kernel: swappiness: 10 (default 60) cache-pressure: 75 (default 100)
ID-1: swap-1 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram0
ID-2: swap-2 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram1
ID-3: swap-3 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram2
ID-4: swap-4 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram3
ID-5: swap-5 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram4
ID-6: swap-6 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram5
ID-7: swap-7 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram6
ID-8: swap-8 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram7
ID-9: swap-9 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram8
ID-10: swap-10 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram9
ID-11: swap-11 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram10
ID-12: swap-12 type: zram size: 663.9 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram11
Sensors:   System Temperatures: cpu: 53.4 C mobo: 0 C gpu: nvidia temp: 42 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 40%
Info:      Processes: 331 Uptime: 15m wakeups: 0 Memory: 7.78 GiB used: 3.96 GiB (50.8%) Init: systemd
v: 248 tool: systemctl Compilers: gcc: 11.1.0 clang: 12.0.0 Packages: pacman: 1466 lib: 386
Shell: fish v: 3.2.2 default: Bash v: 5.1.8 running-in: konsole inxi: 3.3.04

I fixed this by replacing the contents of ~/.cargo/env with set --export PATH $HOME/.cargo/bin $PATH

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.