Skip to content
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

[bugfix] build hook command parsing #2836

Merged
merged 2 commits into from
Aug 27, 2023
Merged

Conversation

smac89
Copy link
Contributor

@smac89 smac89 commented Aug 21, 2023

Description

use shlex, rather than strings package, to split pre/post-build command

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Yes

Test Configuration

Wails CLI v2.5.1

System

... ...
OS ArcoLinux
Version Unknown
ID arcolinux
Go Version go1.20.5
Platform linux
Architecture amd64

Wails

Version v2.5.1
Package Manager pacman

Dependencies

Dependency Package Name Status Version
*docker docker Installed 1:24.0.5-1
gcc gcc Installed 13.2.1-3
libgtk-3 gtk3 Installed 1:3.24.38-1
libwebkit webkit2gtk Installed 2.40.5-1
npm npm Installed 9.8.1-1
pkg-config pkgconf Installed 1.8.1-1

* - Optional Dependency

Diagnosis

Your system is ready for Wails development!
♥ If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

Checklist:

  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

use `shlex`, rather than `strings` package, to split build command
@smac89 smac89 changed the title fix build hook command parsing [bugfix] build hook command parsing Aug 21, 2023
Copy link
Member

@leaanthony leaanthony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this. I noticed the shlex package is deprecated. Do you know of an alternative?

@smac89
Copy link
Contributor Author

smac89 commented Aug 22, 2023

Thanks for submitting this. I noticed the shlex package is deprecated. Do you know of an alternative?

@leaanthony
There is https://github.com/mvdan/sh, but it requires go 1.20+. It contains the shell.Fields function, which seems to be an equivalent to shlex

@leaanthony
Copy link
Member

We can go with github.com/google/shlex for now 👍 Thanks for this 👍

@leaanthony leaanthony merged commit 93a616c into wailsapp:master Aug 27, 2023
2 checks passed
@leaanthony
Copy link
Member

I just realised you didn't update the changelog... Please could you add an entry to the changelog located at website/src/pages/changelog.mdx and open a new PR. Need to make sure this is in the release notes and you get credit.

smac89 added a commit to smac89/wails that referenced this pull request Aug 29, 2023
@smac89 smac89 mentioned this pull request Aug 29, 2023
15 tasks
@smac89
Copy link
Contributor Author

smac89 commented Aug 29, 2023

@leaanthony added in #2868

leaanthony pushed a commit that referenced this pull request Aug 29, 2023
@stffabi
Copy link
Collaborator

stffabi commented Aug 29, 2023

I think there might be a few other cases of this bug in other places like CompressFlags, GarbleArgs or the frontend commands from wails.json. Maybe we should go over the whole repo and fix those?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants