Skip to content

Commit

Permalink
fix: try to fix ci failure with phplinting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Jan 13, 2024
1 parent e812ea6 commit a5b2ee4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion internal/phplint/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package phplint

import (
"context"
"os"
"path"

"github.com/FriendsOfShopware/shopware-cli/internal/system"
Expand All @@ -10,7 +11,15 @@ import (
)

func getWazeroRuntime(ctx context.Context) (wazero.Runtime, error) {
cache, err := wazero.NewCompilationCacheWithDir(path.Join(system.GetShopwareCliCacheDir(), "wasm", "cache"))
wazeroCacheDir := path.Join(system.GetShopwareCliCacheDir(), "wasm", "cache")

if _, err := os.Stat(wazeroCacheDir); os.IsNotExist(err) {
if err := os.MkdirAll(wazeroCacheDir, os.ModePerm); err != nil {
return nil, err
}
}

cache, err := wazero.NewCompilationCacheWithDir(wazeroCacheDir)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit a5b2ee4

Please sign in to comment.