git-directory-deploy icon indicating copy to clipboard operation
git-directory-deploy copied to clipboard

"Deploy directory 'dist' is empty" but it isn't

Open MoOx opened this issue 10 years ago • 4 comments

I just grabbed the latest version of your script and I got this issue. It guess the script need to be at the same level of dist?

~/Sync/Development/statinamic/demo master* ⇡
❯ ./scripts/deploy.sh 
Deploy directory 'dist' is empty. Aborting. If you're sure you want to deploy an empty tree, use the --allow-empty / -e flag.

~/Sync/Development/statinamic/demo master* ⇡
❯❯ ls dist 
collection.json       docs                  index.html            index.json            statinamic-client.css statinamic-client.js

MoOx avatar Oct 29 '15 06:10 MoOx

I opened the script to try to fix that and saw ls --almost-all

~/Sync/Development/statinamic/demo master* ⇡
❯❯ ls --almost-all dist
ls: illegal option -- -

What am I doing wrong? (OS X 10.11.1)

MoOx avatar Oct 29 '15 06:10 MoOx

Not sure why this option is not working for me. I changed the syntax to ls -A and it is working now. Maybe you should do the same in your script?

MoOx avatar Oct 29 '15 06:10 MoOx

ok, it seems the ls on OS X is from BSD and doesn't support long options. so i should:

  • [x] revert to using the short form of the option, -A
  • [ ] make sure errors in command substitutions / conditionals are propagated properly
  • [x] see if i can have my CI run tests on OS X or BSD, too

X1011 avatar Oct 29 '15 20:10 X1011

great plan!

MoOx avatar Oct 29 '15 20:10 MoOx