hs upload
can upload folders to Design Manager with names that later cause hs fetch
to report an error
#579
Labels
Description and Context
There seems to be asymmetry between what
hs upload
will upload vs whaths fetch
will download. It is possible to upload a folder (directory) with a name that later causeshs fetch
to halt with an error. I can confirm this happens with folder names containing a period/full-stop. Other non-alphanumeric characters seem to be denied byhs upload
.That the
hs upload
andhs fetch
subcommands have different restrictions on folder naming is unintuitive, hard for a user to internalize, and can introduce significant time between when the error condition is created vs when it is reported, possibly after significant work in Design Manager has already taken place.Versions:
@hubspot/[email protected]
node v16.6.1
npm 7.20.3
Steps to reproduce
Requirements: A working installation of
hs
with credentials that allow uploading to Design Manager.hs list
should complete successfully.At a shell:
Observe output:
Confirm folder and contents were uploaded
Output:
Try to fetch uploaded folder and contents
Output:
Workaround:
test.folder
in Design Manager's Web UIAt a shell:
Output:
A second partial workaround exists in that individual files can be downloaded:
Output:
But this is not a complete workaround as it does not result in the entire folder being downloaded.
Expected behavior
Either:
hs upload
denies the upload oftest.folder
with an error.OR
hs fetch /test.folder test_fetch
step completes successfully, downloading the contents of/test.folder
from Design Manager into the local foldertest_fetch
.Is something in
hs fetch
testing the name against a whitelist of file extensions before checking that the remote resource is a folder?The text was updated successfully, but these errors were encountered: