-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing (pre|post)BuildHooks with no build/bin
dir
#2224
Comments
Thanks for using Wails and reporting this issue. Unfortunately I'm unable to reproduce this on macOS with Wails 2.2.0 by using your provided steps. wails init -n some-name
cd some-name
rm -r build
wails dev What version of Wails are you using? You mention something about BuildHooks in the title, but there's nothing mentioned in your repro guide. |
Please provide system details as requested in the template. Thanks. |
Oh, what a me 🤦 |
I can reproduce this with the provided steps on popOS 22.04. It fails on stdout, stderr, err := shell.RunCommand(options.BinDirectory, args[0], args[1:]...) If I check and create the directory in // Set build directory
options.BinDirectory = filepath.Join(options.ProjectData.GetBuildDir(), "bin")
if !fs.DirExists(options.BinDirectory) {
if err := fs.MkDirs(options.BinDirectory); err != nil {
return "", fmt.Errorf("cannot build, target directory missing %w", err)
}
} Edit: Used the current 2.2.0 wails cli, initially. |
I'd like to fix this. Is it ok if I check and or create the directory in /v2/pkg/commands/build/build.go:L407 before |
Description
If the
build/bin
directory is removed, or if the project is cloned, thewails dev
fails onThe
build/bin
dir is automatically added to.gitignore
file, so the directory isn't being pushed to repository. That leads to that the dir is missing if the repo is cloned.To Reproduce
Expected behaviour
The wails cli could create the directory instead of failing
Screenshots
No response
Attempted Fixes
No response
System Details
Additional context
No response
The text was updated successfully, but these errors were encountered: