Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Uninstalling netclient from homebrew results in error #23

Open
1 task done
lukvacek opened this issue Nov 21, 2022 · 9 comments
Open
1 task done

[Bug]: Uninstalling netclient from homebrew results in error #23

lukvacek opened this issue Nov 21, 2022 · 9 comments
Assignees
Labels
bug Something isn't working fixed

Comments

@lukvacek
Copy link

Contact Details

No response

What happened?

Attempting to uninstall netclient using brew returns an error:

~ % brew uninstall netclient
==> Uninstalling Cask netclient
==> Running uninstall script
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.

Version

v0.16.3

What OS are you using?

Mac

Relevant log output

~ % brew uninstall netclient
==> Uninstalling Cask netclient
==> Running uninstall script 
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.

Contributing guidelines

  • Yes, I did.
@lukvacek lukvacek added the bug Something isn't working label Nov 21, 2022
@gi8
Copy link

gi8 commented Nov 21, 2022

I have a same problem with macos 13

@tobiasquinn
Copy link

This also prevents upgrade from gravitl/netclient/netclient 0.16.1 -> 0.16.3

@mattkasun mattkasun transferred this issue from gravitl/netmaker Nov 28, 2022
@mattkasun
Copy link
Contributor

#22 fixes

@kristvanbesien
Copy link

If this is fixed, why can I still not upgrade netclient?

krist@MacBook-Pro ~ % brew upgrade netclient
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.16.1 -> 0.16.3
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.16.3/darwin/netclient-arm64.tgz
Already downloaded: /Users/krist/Library/Caches/Homebrew/downloads/c034189c3c328d401d14b3e3ab1c5e67564ffde972803dc29a4d82bac8da48be--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script
==> Purging files for version 0.16.3 of Cask netclient
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.

@breagan-acs
Copy link
Contributor

Adding the uninstall.sh script to the uninstall stanza seems to resolve it; not a homebrew dev so I'm not sure if that's the right way to go about it.

#24

@hseshadr
Copy link

This is still a problem in MacOS:

harish@harishs-mbp-2 ~ % brew uninstall netclient --force --ignore-dependencies
==> Uninstalling Cask netclient
==> Running uninstall script
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.
harish@harishs-mbp-2 ~ % brew uninstall netclient
==> Uninstalling Cask netclient
==> Running uninstall script
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.
harish@harishs-mbp-2 ~ %

@infused-kim
Copy link

@hseshadr to fix this problem, I had to edit /opt/homebrew/Caskroom/netclient/.metadata/0.16.0/20221008210119.360/Casks/netclient.rb to add the changes from PR #24 ...

  uninstall script: {
  }

to...

  uninstall script: {
    executable: "#{staged_path}/uninstall.sh",
    sudo: true,
  }

After that I was able to uninstall netclient with brew uninstall netclient.

Your path to the netclient.rb will probably be slightly different though.

@b4good
Copy link

b4good commented Feb 28, 2023

Also in Version 0.17.1. it is still a bug.
The solution from @infused-kim helped! :)

@Spacebjorn
Copy link

Still an issue in 0.20 @infused-kim solution works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests