bruno
bruno copied to clipboard
Can't import a POSTMAN collection with a / char in the name
When attempting to import a postman collection with a name containing "/", the initial detection seems correct ("name" is correctly displayed), the import seems to be successful... "Collection imported successfully" is being displayed, but the collection is not imported at all (nothing in the destination folder, and no new collection opened in the main interface).
When looking at the dev console (postman collection called "MYAPP\SOMETHING ELSE", by example)
Uncaught (in promise) Error: Error invoking remote method 'renderer:import-collection': Error: ENOENT: no such file or directory, mkdir 'C:\Users\MY_USER\Documents\Bruno collections\MYAPP\SOMETHING ELSE'
Removing or replacing the "/" char leads to a successful import
@l0new4nder3r The fix done by @tpyle has been released in v0.16.3
Can you test and confirm this on your end ?
Hi, thanks @tpyle !
Successfully tested a few minutes ago with v0.16.4
Testing with a postman collection containing a slash in its name property.
Importing process (same as before, slash is still present)
The collection is imported without issue - the only thing is that now, its name has changed. The slash has become an hyphen. Consistent with what I see in the commit, and at least it does not break!
Improvement with a much lesser priority : allow any character in the collection name?
Hi @l0new4nder3r,
Unfortunately, since bruno stores collections (and requests) as files and directories, that requirement comes from the filesystem, not from bruno itself. Every filesystem that I'm aware of doesn't allow /
in directory names or folder names, as it's used in UNIX-like OS's as a delimiter between directories.
I suppose we could URL encode the collection name (so that in the filesystem it looks like Collection%2FName
, and then render it to the user as Collection/Name
), but I feel like that's somewhat odd of behavior. What are your thoughts on this @helloanoop?
Yes, Its a restriction at the filesystem level.
You can still choose to rename the collection in the UI and that will reflect in the UI. Meaning you can change it to Ex: "Payment/ConfigApi". This name gets updated in bruno.json
which the UI will consume to render the name.
But in the filesystem level we are bounded by the naming restrictions of filesystem
bruno.json
{
"version": "1",
"name": "Payment/ConfigApi",
"type": "collection"
}
}
Hey, I'm encountering similar issue here, but with different chars. I'm trying to import a postman collection with name [POC] XXX
and when it's imported, I see a blank result in the IDE
@irfansofyana can you tell me what OS you're on? Or what filesystem you're using, if you're aware? If you're on a linux/unix/mac system, you should be able to run df -T
to tell.
New user here. I name most of my requests after their route eg bruno/issues
. Renaming collections works, but not requests. This is quite restrictive.
..but it looks like this is may just be a UI bug? If I manually change the name in the meta section of the request bru file, it is reflected in the UI. However, if I change it in the UI, it silently does nothing.
Can confirm, there is something fishy with renaming requests via ui 🤔
@irfansofyana can you tell me what OS you're on? Or what filesystem you're using, if you're aware? If you're on a linux/unix/mac system, you should be able to run
df -T
to tell.
Hi, I'm using macOS
Can confirm, there is something fishy with renaming requests via ui 🤔
See also various other issues like #1336 and #1404, which are currently being solved in #349.
I am in favor of tracking the solution to the original problem (importing from Postman) in this issue.