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

Export (Mac) not handling relative paths with a ~ #41

Closed
stephen-holinaty-sp opened this issue Mar 3, 2023 · 6 comments
Closed

Export (Mac) not handling relative paths with a ~ #41

stephen-holinaty-sp opened this issue Mar 3, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@stephen-holinaty-sp
Copy link

stephen-holinaty-sp commented Mar 3, 2023

Describe the bug
while exporting (r-click, export sp-config), the default path/filename doesnt work, and ~/Desktop/file.xml fails.

To Reproduce
Using VSCode for mac:

right click on a source
Select "Export SP-Config"
in the "Enter the file name" box, its prepopulated with some data. hit enter
"Error running command..." error
try again, enter ~/Desktop/file.json
"Error running command"
try again, with /usr/admin/Desktop/file.json
Success

Expected behavior
the "Default" filename should provide a valid export, saved... somewhere.
relative paths on mac using the ~ operator should be successful, i.e. ~/Desktop/filename.json

Screenshots
Screenshot 2023-03-03 at 8 30 21 AM

Environment
Provide a screenshot of Help > About.

Logs
[Extension Host] Writing to identitynowconfig-TENANT-sb.identitynow.com-NetSuite INTQA-2023-03-03T14-27-23.json

Error running command vscode-sailpoint-identitynow.export-node-config.view: A system error occurred (EROFS: read-only file system, open 'identitynowconfig-TENANT-sb.identitynow.com-NetSuite-2023-03-03T14-27-23.json'). This is likely caused by the extension that contributes vscode-sailpoint-identitynow.export-node-config.view.

@stephen-holinaty-sp stephen-holinaty-sp added the bug Something isn't working label Mar 3, 2023
@yannick-beot-sp
Copy link
Owner

~ is a 'shell nugget".
To resolve ~, we need "extra work" to manage this case (cf. nodejs/node#684).

@stephen-holinaty-sp
Copy link
Author

@yannick-beot-sp that is entirely fair.
is there any other way that the Default "export" can be a valid path, then?
in my mind, "Export... Enter!" should not give a failing use-case.

I'm not sure what type of default save-to location i would even propose, but as we are populating a filename into the default value, my assumption would be fore it to work.
or even to replace the default filename with
(unix) \path\to\directory\filename.xml)
(windows) c:\filepath\filename.xml

or, put another way:
if we cant provide a valid path, at least provide a contextual breadcrumb so the user isnt stumbling to find out Why their export is failing.

@yannick-beot-sp
Copy link
Owner

Export is not failing case. It is just exporting where you do not know which is either the home folder or VSCode folder.
I do not have any problem with export because I have a "workspace".
I open a folder (for my project, my git repository) and then, VSCode will propose a folder under this folder.
I will update this behavior soon to have some personnalization.

@stephen-holinaty-sp
Copy link
Author

^ good point re: workspace.
When i first open VSCode, there is no open workspace.
then i begin interacting with the IdentityNow module, try to export, and
Screenshot 2023-03-08 at 8 52 03 AM
Screenshot 2023-03-08 at 8 52 27 AM

you are correct. with a workspace open, it auto-populates:
Screenshot 2023-03-08 at 8 53 18 AM

@yannick-beot-sp
Copy link
Owner

I started to work on being able to set the default path proposition in the settings
cf.

"default": "%x/reports/%T-%S-Accounts-%y%M%d-%h%m%s.csv"

The idea is to extend what I just did for new reports to SP-Config exports.

With this capability, you could hard code a path to export to (within your home dir or not), set the architecture of files and folders you want, have dates or not in the filename, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants