catppuccin / gtk

🪟 Soothing pastel theme for GTK3/4
GNU General Public License v3.0
913 stars 55 forks source link

Install script should overwrite existing symlinks in gtk-4.0 directory #259

Closed OlaoluwaM closed 6 months ago

OlaoluwaM commented 6 months ago

Is there an existing issue outlining your problem?

Describe the bug.

Right now the script fails if symlinks already exist in the gtk-4.0 directory when you pass the --link flag to the script

[catppuccin-gtk] [INFO] - Installation info:
        flavor:     mocha
        accent:     lavender
        dest:       /home/olaolu/.local/share/themes
        link:       True
remote_url: https://github.com/catppuccin/gtk/releases/download/v1.0.2/catppuccin-mocha-lavender-standard+default.zip
[catppuccin-gtk] [INFO] - Starting download...
[catppuccin-gtk] [INFO] - Response status: 200
[catppuccin-gtk] [INFO] - Download finished, zip is valid
[catppuccin-gtk] [INFO] - Verifying download..
[catppuccin-gtk] [INFO] - Download verified
[catppuccin-gtk] [INFO] - Extracting...
[catppuccin-gtk] [INFO] - Extraction complete
[catppuccin-gtk] [INFO] - Adding symlinks for libadwaita
[catppuccin-gtk] [INFO] - Root:   /home/olaolu/.local/share/themes/catppuccin-mocha-lavender-standard+default-dark/gtk-4.0
[catppuccin-gtk] [INFO] - Target: /home/olaolu/.config/gtk-4.0
[catppuccin-gtk] [ERROR] - Something went wrong when installing the theme:
Traceback (most recent call last):
  File "/home/olaolu/install.py", line 214, in <module>
    main()
  File "/home/olaolu/install.py", line 209, in main
    install(ctx)
  File "/home/olaolu/install.py", line 161, in install
    add_libadwaita_links(ctx)
  File "/home/olaolu/install.py", line 143, in add_libadwaita_links
    os.symlink(dir_name / "assets", gtk4_dir / "assets")
FileExistsError: [Errno 17] File exists: '/home/olaolu/.local/share/themes/catppuccin-mocha-lavender-standard+default-dark/gtk-4.0/assets' -> '/home/olaolu/.config/gtk-4.0/assets'

Attach screenshots.

No response

How did you install the theme?

From release (install.py)

Are you running the latest release, and if not does the issue persist there?

If using GTK4, have you symlinked the "gtk-4.0" folder?

What GNOME version are you seeing the bug on?

GNOME Shell 46.2

Any additional comments?

No response

nullishamy commented 6 months ago

Tracking in #257