Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
New setting to control creation of Artifact Id folder #197
New setting to control creation of Artifact Id folder #197
Changes from 3 commits
c01a67c
2426f6d
43c1c16
9470ad8
852d91d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here when the user cancels the select folder dialog,
outputUri
will be undefined, directly accessingoutputUri.fsPath
would cause an error.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that would happen in the previous code as well, right? Not very experienced in TS.
Anyway, do you have a more specific recommendation for this? Or simply checking if the value is not undefined right after line 112 seems fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
previous code is safe because it has a
outputUri &&
before, sooutput.fsPath
will not be executed if outputUri is undefined.Another reason not to use
fsPath
is, for some virtual workspaces like Codespaces, there no filesystem and uri doesn's starts with schemefile:
.Here you create variable
projectLocation
only because you want to judge if it's an empty. I suggest to directly usevscode.workspace.fs.readDirectory(uri)
, which can also cover those virtual workspaces. And you don't needprojectLocation
then.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe my changes now are more aligned with Virtual Workspaces compatibility. Instead of using
vscode.Uri.file()
, I've created them using.parse()
, as the former adds thescheme
topath
as well, for some weird reason.When showing the project path in
specifyOpenMethod()
, it'd be harder to read. Example:By using
vscode.Uri.parse("/Users/johndoe/projects/folder")
, this is the result: