Skip to content

Commit

Permalink
fix: logging of ldd failure
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Jan 13, 2024
1 parent b0ec648 commit b757531
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/esbuild/download_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"runtime"
"strings"

"google.golang.org/appengine/log"
"github.com/FriendsOfShopware/shopware-cli/logging"
)

func downloadDartSass(ctx context.Context, cacheDir string) error {
Expand Down Expand Up @@ -98,16 +98,17 @@ func downloadDartSass(ctx context.Context, cacheDir string) error {
return nil
}

// determines that we need to download musl dart-sas or not
// determines that we need to download musl dart-sas or not.
func detectDownloadPrefix(ctx context.Context) string {
// if we are on darwin, we don't need to download musl dart-sass
if runtime.GOOS == "darwin" {
return ""
}

resp, err := exec.CommandContext(ctx, "ldd", "--version").CombinedOutput()
if err != nil {
log.Infof(ctx, "cannot run ldd to determine which dart-sass build is requierd: %s, using gnu libc", err)

if resp == nil {
logging.FromContext(ctx).Infof("cannot run ldd to determine which dart-sass build is requierd: %s, using gnu libc", err)

return ""
}
Expand Down

0 comments on commit b757531

Please sign in to comment.