Publish icon indicating copy to clipboard operation
Publish copied to clipboard

Use `sudo` to Move Into Protected Directory

Open rogerluan opened this issue 3 years ago • 0 comments

Description

This is the error I was getting without sudo:

swift build -c release
[…]
Building for production...
<unknown>:0: warning: 'self' refers to the method 'HTMLAnchorTarget.self', which may be unexpected
<unknown>:0: note: use 'HTMLAnchorTarget.self' to silence this warning
[11/11] Linking publish-cli
Build complete! (29.03s)
install .build/release/publish-cli /usr/local/bin/publish
install: /usr/local/bin/publish: Permission denied
make: *** [install] Error 71

With sudo it works:

swift build -c release
Building for production...
Build complete! (0.18s)
sudo install .build/release/publish-cli /usr/local/bin/publish
Password:

Without sudo I get the "permission denied" issue even being the root/admin of this computer 🤷

rogerluan avatar May 09 '22 11:05 rogerluan