mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 03:49:40 -08:00
fix(node): stop when yarn is detected
This commit is contained in:
parent
016d981baa
commit
1f25cd4b1c
|
@ -49,6 +49,7 @@ func (n *node) loadContext() {
|
|||
}
|
||||
if n.language.env.hasFiles("yarn.lock") {
|
||||
n.packageManagerIcon = n.language.props.getString(YarnIcon, " \uF61A")
|
||||
return
|
||||
}
|
||||
if n.language.env.hasFiles("package-lock.json") || n.language.env.hasFiles("package.json") {
|
||||
n.packageManagerIcon = n.language.props.getString(NPMIcon, " \uE71E")
|
||||
|
|
|
@ -49,6 +49,7 @@ func TestNodeInContext(t *testing.T) {
|
|||
{Case: "npm", hasNPM: true, ExpectedString: "npm", PkgMgrEnabled: true},
|
||||
{Case: "default", hasDefault: true, ExpectedString: "npm", PkgMgrEnabled: true},
|
||||
{Case: "disabled", HasYarn: true, ExpectedString: "", PkgMgrEnabled: false},
|
||||
{Case: "yarn and npm", HasYarn: true, hasNPM: true, ExpectedString: "yarn", PkgMgrEnabled: true},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
|
|
Loading…
Reference in a new issue