Skip to content

Fix usage of extname, dirname when there is no project path#1067

Open
rly wants to merge 1 commit intostyczynski:masterfrom
rly:fix/dep_extname
Open

Fix usage of extname, dirname when there is no project path#1067
rly wants to merge 1 commit intostyczynski:masterfrom
rly:fix/dep_extname

Conversation

@rly
Copy link
Copy Markdown

@rly rly commented Jun 12, 2020

Fix #115 and all the many other duplicates.

When Atom is opened without a project, atom.project.getPaths()[0] is undefined and raises an error in the Atom deprecation cop. Return @userHome in this case. Do not return null because functions downstream of getCwd expect a string.

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.

path.extname is deprecated.

1 participant