Skip to content

Commit

Permalink
fix(projects): Support volta on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwalton committed Feb 1, 2022
1 parent 7798486 commit 1711f68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/kitsch/projects/nodejsGetter.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (getter nodejsGetter) GetValue(getterContext getters.GetterContext) (interf
}

// If the executable is "volta-shim", ask volta for the command we're actually going to run.
if strings.HasSuffix(executable, "volta-shim") {
if strings.HasSuffix(executable, "volta-shim") || strings.HasSuffix(executable, "volta-shim.exe") {
return getter.getFromVolta(getterContext)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/kitsch/projects/nodejsGetter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestGetNodeVersionFromVoltaPacakgeJSON(t *testing.T) {
ctx := testContext{fsys: fsys}

getter := nodejsGetter{executable: "node"}
version, err := getter.GetValue(ctx)
version, err := getter.getFromVoltaPackageJSON(ctx)
assert.NoError(t, err)
assert.Equal(t, "16.0.0", version)
}

0 comments on commit 1711f68

Please sign in to comment.