appwrite / sdk-for-cli

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

functions createTag fails when the full file path where the code is has a space character #10

Closed JaviBonilla closed 3 years ago

JaviBonilla commented 3 years ago

If the full file path where the code is located has a space character, i.e. /home/javi/functions/analyze Image/ the functions createTag command

appwrite functions createTag \
    --functionId=60dcbc0b83abc \
    --command='python main.py' \
    --code='./deploy'

fails with this error.

docker: invalid reference format.
See 'docker run --help'.

Otherwise, /home/javi/functions/analyzeImage/, it works fine.

christyjacob4 commented 3 years ago

@JaviBonilla Thank you for raising this :smiley:

https://github.com/appwrite/sdk-generator/pull/228 Should fix it :+1:

JaviBonilla commented 3 years ago

@christyjacob4 Great! Thanks.

There is another kind of issue, when the size of the code.tar.gz is greater than the given in _APP_STORAGE_LIMITenvironment variable, the deployment fails and this warning (which doesn`t clearly point to the issue) is given.

Warning: Invalid argument supplied for foreach() in /usr/local/code/src/Parser.php on line 47

Could you try to replicate that?

christyjacob4 commented 3 years ago

@JaviBonilla Yes , I was able to replicate it and this PR https://github.com/appwrite/sdk-generator/pull/229 has a fix for that as well :smile:
Thanks for helping with the debugging

JaviBonilla commented 3 years ago

Thanks @christyjacob4

eldadfux commented 3 years ago

This fix is now available in the latest CLI release.