Closed stefanw closed 1 year ago
Yeah that's a good call: generate_dir
being resolved relative to that temporary directory is most definitely a bug!
Replicated that other bug locally:
datasette publish fly github.db -a wat --generate-dir foop --plugins plugins
Which does this:
File "/Users/simon/.pyenv/versions/3.10.0/lib/python3.10/shutil.py", line 417, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/Users/simon/.pyenv/versions/3.10.0/lib/python3.10/shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
IsADirectoryError: [Errno 21] Is a directory: 'plugins'
Code at fault is:
Used ChatGPT:
I tried out
--generate-dir
and ran into two problems with the code that's responsible:https://github.com/simonw/datasette-publish-fly/blob/564a216508466b9cb1d0b30fe90199fc8546df46/datasette_publish_fly/__init__.py#L313-L322
As a workaround I had to give an absolute path, but that was after some confusion and digging into the code.