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

askForDocuments - throw error if no workspace found #967

Merged
merged 2 commits into from
Nov 28, 2018
Merged

Conversation

PrashanthCorp
Copy link
Contributor

Fixes #961.
The vague error arises from showOpenDialog. Hence I'm performing a check and printing a better message instead.

@PrashanthCorp PrashanthCorp requested a review from a team as a code owner November 28, 2018 01:16
src/commands/importDocuments.ts Outdated Show resolved Hide resolved
canSelectMany: true,
openLabel: "Import",
filters: {
"JSON": ["json"]
},
defaultUri: vscode.Uri.file(vscode.workspace.rootPath)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Course, you could've just done this:

defaultUri: vscode.workspace.rootPath ? vscode.Uri.file(vscode.workspace.rootPath) : undefined

@PrashanthCorp PrashanthCorp merged commit c0d75c7 into master Nov 28, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2021
@bk201- bk201- deleted the ps/961 branch October 23, 2024 07:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants