Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle international characters in remote HS paths #442

Merged
merged 3 commits into from
Feb 23, 2021

Conversation

lars-erik
Copy link
Contributor

@lars-erik lars-erik commented Feb 12, 2021

Description and Context

Using for instance hs remove with international characters like 'æøå' fails. ([ERROR] The delete of "Æøå" in account nnnnnnn was bad.)
The fileMapper.deleteFile method now properly uses encodeURIComponent.
I haven't browsed the rest of the methods, but likely all of them should encode paths.

The initial commit was a silly attempt breaking all tests. Second commit is likely the right solution. (Did not find any "remove" tests) 😇

Screenshots

❯ hs remove Æoå
[ERROR] Deleting "Æøå" from account nnnnnnn failed
[ERROR] The delete of "Æøå" in account nnnnnnn was bad.

patched:

❯ yarn hs remove Æoå
yarn run v1.22.10
$ "C:\Users\lars-\source\repos\open source\hubspot-cli\node_modules\.bin\hs" remove Æøå
Deleted "Æøå" from account nnnnnnn
Done in 2.22s.

Who to Notify

🤷‍♂️

@lars-erik lars-erik marked this pull request as ready for review February 12, 2021 14:38
@gcorne
Copy link
Contributor

gcorne commented Feb 12, 2021

Thanks for fixing this. If we can remove the change to remove.js, we can get this in.

@lars-erik
Copy link
Contributor Author

Done. :)

@gcorne gcorne merged commit 4f2fdec into HubSpot:master Feb 23, 2021
@lars-erik
Copy link
Contributor Author

🙏🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants