Skip to content

Commit

Permalink
fix: change npm cache dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Germanov committed Oct 15, 2024
1 parent e1a3653 commit 970f340
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/npmExecuteTests.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func runNpmExecuteTests(config *npmExecuteTestsOptions, c command.ExecRunner) er
c.SetEnv([]string{path})
}

if err := c.RunExecutable("npm", "config", "set", "cache", "~/.npm-cache", "--global"); err != nil {
return fmt.Errorf("failed to set npm cache directory: %w", err)
}

installCommandTokens := strings.Fields(config.InstallCommand)
if err := c.RunExecutable(installCommandTokens[0], installCommandTokens[1:]...); err != nil {
return fmt.Errorf("failed to execute install command: %w", err)
Expand Down

0 comments on commit 970f340

Please sign in to comment.