appwrite / sdk-for-cli

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

Failed to execute process '/usr/local/bin/appwrite'. #8

Closed DanTheMinotaur closed 2 years ago

DanTheMinotaur commented 3 years ago

When executing appwrite in a non-bash shell (I'm using fish). It will respond with unknown error.

> appwrite
Failed to execute process '/usr/local/bin/appwrite'. Reason:
exec: unknown error (errno was 8)
The file '/usr/local/bin/appwrite' is marked as an executable but could not be run by the operating system.

This is due to their being a newline before the shebang. It can be fixed by removing the newline.

/usr/local/bin/appwrite


#!/bin/bash
...

Probably an non-issue but thought I'd leave it here if anyone else runs into this.

christyjacob4 commented 3 years ago

Hey @DanTheMinotaur Thanks for raising this. I wasn't aware of this quirk !! Any ideas as to why there is a different behaviour in different shells? We will fix it soon 😄

DanTheMinotaur commented 3 years ago

Hey @DanTheMinotaur Thanks for raising this. I wasn't aware of this quirk !! Any ideas as to why there is a different behaviour in different shells? We will fix it soon smile

@christyjacob4 According to wikipedia it comes from shell scripts, which need to interpret the first two bytes in a shell file, when being run in the kernel. Here's an explanation on stackoverflow

I wouldn't be an expert, but if I had to guess fish strictly interprets this rule, while bash doesn't.

christyjacob4 commented 2 years ago

@DanTheMinotaur Please let me know if this is still an issue with the latest CLI 0.15.0

stnguyen90 commented 2 years ago

@DanTheMinotaur can this be closed now?

DanTheMinotaur commented 2 years ago

@stnguyen90 all good now 👍