From add10df5ffef08b1068cda8e7aef20714cb63773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Z=C3=A1mb=C3=B3=2C=20Levente?= Date: Fri, 6 Jan 2023 20:51:01 +0100 Subject: [PATCH] fix missing bin dir on build hook (#2273) * fix missing bin dir on build hook * add fix to changelog --- v2/pkg/commands/build/build.go | 6 ++++++ website/src/pages/changelog.mdx | 3 +++ 2 files changed, 9 insertions(+) diff --git a/v2/pkg/commands/build/build.go b/v2/pkg/commands/build/build.go index b474c477a..fe8f926f5 100644 --- a/v2/pkg/commands/build/build.go +++ b/v2/pkg/commands/build/build.go @@ -405,6 +405,12 @@ func executeBuildHook(outputLogger *clilogger.CLILogger, options *Options, hookI } + if !fs.DirExists(options.BinDirectory) { + if err := fs.MkDirs(options.BinDirectory); err != nil { + return fmt.Errorf("could not create target directory: %s", err.Error()) + } + } + stdout, stderr, err := shell.RunCommand(options.BinDirectory, args[0], args[1:]...) if options.Verbosity == VERBOSE { pterm.Info.Println(stdout) diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index 0322f636e..8ada62fcc 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -18,6 +18,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added Webview GPU acceleration options for [Windows](/docs/reference/options#webviewgpuisdisabled) and [Linux](/docs/reference/options#webviewgpupolicy). Added by @Lyimmi in [PR](https://github.com/wailsapp/wails/pull/2266) - Added `EnableFraudulentWebsiteDetection` option to opt-in to scan services for fraudulent content, such as malware or phishing attempts. Older releases had the scan services per default activated. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2269) +### Fixed +- Fixed failing build hooks when `build/bin` was missing. Fixed by @Lyimmi in [PR](https://github.com/wailsapp/wails/pull/2273) + ## v2.3.0 - 2022-12-29 ### Added