INNER CODE UNIT · Go

embedPlatform

werf/nelm · scripts/embed-deno/main.go:48

func embedPlatform(ctx context.Context, goos, goarch, embedRoot string) error {
	platformDir := filepath.Join(embedRoot, goos, goarch)
	if err := os.MkdirAll(platformDir, 0o755); err != nil {
		return fmt.Errorf("create dir %s: %w", platformDir, err)
	}

	downloadDir, err := os.MkdirTemp("", "embed-deno-*")
	if err != nil {
		return fmt.Errorf("create temp download directory: %w", err)
	}

	defer os.RemoveAll(downloadDir)

	binaryPath, err := ts.DownloadDenoForPlatform(ctx, goos, goarch, downloadDir)
	if err != nil {
		return fmt.Errorf("download deno: %w", err)
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…