Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(adapter resolver): resolve '~' to HOME directory#1008

Open
arthur-fontaine wants to merge 1 commit into
commitizen:mastercommitizen/cz-cli:masterfrom
arthur-fontaine:masterarthur-fontaine/cz-cli:masterCopy head branch name to clipboard
Open

feat(adapter resolver): resolve '~' to HOME directory#1008
arthur-fontaine wants to merge 1 commit into
commitizen:mastercommitizen/cz-cli:masterfrom
arthur-fontaine:masterarthur-fontaine/cz-cli:masterCopy head branch name to clipboard

Conversation

@arthur-fontaine
Copy link
Copy Markdown

This PR adds the support for ~ for the path property in the configuration file.

Use case

I install all my global dependencies with Mise to have the same environment on my different computers. This causes require("cz-emoji") to not work.

So I have to specify the path of the dependency manually.

{ "path": "/Users/arthur-fontaine/.local/share/mise/installs/npm-cz-emoji/latest/lib/node_modules/cz-emoji" }

This works, but as specified above, I want to have the same environment on my different computers, which have different usernames (on my computer 1, the home path is /Users/arthur-fontaine, and on my computer 2, this is /Users/arthurfontaine). So I tried to replace the absolute home path with ~ as follows.

{ "path": "~/.local/share/mise/installs/npm-cz-emoji/latest/lib/node_modules/cz-emoji" }

But it didn't work. This PR makes it work!

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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.