appwrite / sdk-for-cli

[READ-ONLY] Official Appwrite CLI >_
BSD 3-Clause "New" or "Revised" License
85 stars 28 forks source link

πŸ› Bug Report: CLI install script fails for Apple Silicon Mac #18

Closed Derek-X-Wang closed 2 years ago

Derek-X-Wang commented 2 years ago

curl -sL https://appwrite.io/cli/install.sh | bash fails on Apple Silicon Mac

For Apple Silicon Mac, sudo is needed when cp to "/usr/local/bin".

This behavior is different from Intel Mac which doesn't need sudo.

Error Log

➜  ~ curl -sL https://appwrite.io/cli/install.sh | bash

    _                            _ _           ___   __   _____
   /_\  _ __  _ ____      ___ __(_) |_ ___    / __\ / /   \_   \
  //_\| '_ \| '_ \ \ /\ / / '__| | __/ _ \  / /   / /     / /\/
 /  _  \ |_) | |_) \ V  V /| |  | | ||  __/ / /___/ /___/\/ /_
 \_/ \_/ .__/| .__/ \_/\_/ |_|  |_|\__\___| \____/\____/\____/
       |_|   |_|

πŸ”₯ Welcome to the Appwrite CLI install shield πŸ›‘.
[1/4] Getting System Info ...

OS : darwin
ARCH : arm64
REQUIRES ROOT : false

[2/4] Performing Checks ...
🚦 Checking if docker is installed ...
βœ… Done ...

πŸƒβ€ Checking if docker daemon is running ...
βœ… Done ...

[3/4] Starting installation ...
🐳 Pulling docker image ...
βœ… Done ...

🚧 Setting Permissions
βœ… Done ...

πŸ“ Copying temporary file to /usr/local/bin/appwrite ...
cp: /usr/local/bin/appwrite: Permission denied
❌ Failed to copy temporary file to /usr/local/bin/appwrite ...
Derek-X-Wang commented 2 years ago

I made a pull request for this issue https://github.com/appwrite/sdk-generator/pull/274

Derek-X-Wang commented 2 years ago

Close as the pull request merged