Open BenCrulis opened 5 years ago
I found a workaround, it seems to work again by telling couscous to remove the .git file after html generation in its scripts section:
scripts:
after:
- rm .couscous/generated/.git
Hi, this is weird, Couscous should ignore hidden directories:
so it should not try to copy the .git
directory at all 🤔
Can you confirm this is what Couscous is doing and this is the problem?
Hi, I added some debug prints under $excludedDirectories
at the end of Project.php to see what's excluded:
echo "Debug:\n";
foreach($excludedDirectories->toArray() as $thing){
echo $thing;
echo "\n";
}
I ran a couscous preview
and couscous deploy
, it printed tons of files starting with a dot:
Debug:
vendor
website
.git
.gitignore
__pycache__
.Python
build
develop-eggs
dist
downloads
eggs
.eggs
lib
lib64
parts
sdist
var
wheels
.installed.cfg
MANIFEST
pip-log.txt
pip-delete-this-directory.txt
htmlcov
.tox
.coverage
.cache
nosetests.xml
coverage.xml
.hypothesis
.pytest_cache
local_settings.py
db.sqlite3
instance
.webassets-cache
.scrapy
docs/_build
target
.ipynb_checkpoints
.python-version
celerybeat-schedule
.env
.venv
env
venv
ENV
env.bak
venv.bak
.spyderproject
.spyproject
.ropeproject
site
.mypy_cache
.couscous
Debug:
vendor
website
.git
.gitignore
__pycache__
.Python
build
develop-eggs
dist
downloads
eggs
.eggs
lib
lib64
parts
sdist
var
wheels
.installed.cfg
MANIFEST
pip-log.txt
pip-delete-this-directory.txt
htmlcov
.tox
.coverage
.cache
nosetests.xml
coverage.xml
.hypothesis
.pytest_cache
local_settings.py
db.sqlite3
instance
.webassets-cache
.scrapy
docs/_build
target
.ipynb_checkpoints
.python-version
celerybeat-schedule
.env
.venv
env
venv
ENV
env.bak
venv.bak
.spyderproject
.spyproject
.ropeproject
site
.mypy_cache
.couscous
I tried another debug print:
echo "Debug 2:\n";
foreach ($finder as $thing) {
echo $thing;
echo "\n";
}
This time, no dotted files are printed, only directories.
I suspect the problem does not come from this file as it seems to be specific to couscous deploy
.
Thank you for looking into this, I have absolutely no php skill to look myself.
Context
I made some local changes in my git configuration, played with git submodules and branches and then suddenly
couscous deploy
ceased to work. I now always get the same error:Couscous seems to have the writing permission but the source is a file and the target is a folder.
The content of the .git file in question is
What I tried
Couscous preview still works perfectly.
Although no commit or push was done, it also ceased to work when deploying from another machine.
I also hoped adding .git to the excluded folders in couscous.yml would change something but it didn't work.