Skip to content

Improve Build Commands to Accommodate Spaces#4845

Merged
leaanthony merged 9 commits into
wailsapp:v3-alphafrom
ndianabasi:improve_commands_to_accomodate_spaces_in_app_name
Jan 2, 2026
Merged

Improve Build Commands to Accommodate Spaces#4845
leaanthony merged 9 commits into
wailsapp:v3-alphafrom
ndianabasi:improve_commands_to_accomodate_spaces_in_app_name

Conversation

@ndianabasi

@ndianabasi ndianabasi commented Jan 1, 2026

Copy link
Copy Markdown
Contributor

Description

This PR improves the commands in Taskfile.yml files for all operation systems to accommodate spaces in variables such as APP_NAME.

Fixes # (issue)

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

Test Configuration

Please paste the output of wails doctor. If you are unable to run this command, please describe your environment in as much detail as possible.

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • 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

Summary by CodeRabbit

  • Bug Fixes

    • Build and deployment commands now reliably handle application names and file paths containing spaces across Android, iOS, macOS, Linux, and Windows.
  • Chores

    • Changelog updated to record the cross-platform path-handling improvements.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 1, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Cross-platform Taskfile.yml updates add quoting around file paths and template variables across Android, Darwin, iOS, Linux, and Windows build configurations to ensure proper handling of spaces in variables like APP_NAME. The changelog entry documents this fix.

Changes

Cohort / File(s) Summary
Changelog
v3/UNRELEASED_CHANGELOG.md
Added a concrete changelog entry documenting cross-OS Taskfile.yml updates to handle spaces in variables such as APP_NAME.
Android Build Configuration
v3/internal/commands/build_assets/android/Taskfile.yml
Wrapped path/argument interpolations in quotes for assemble:apk, assemble:apk:release, deploy-emulator, and run tasks to preserve spaces in BIN_DIR/APP_NAME.
Darwin Build Configuration
v3/internal/commands/build_assets/darwin/Taskfile.yml
Added quoting for APP_NAME env, output paths, and file arguments across bundling, codesign, run, sign, and notarize tasks to handle spaces.
iOS Build Configuration
v3/internal/commands/build_assets/ios/Taskfile.yml
Consistently quoted file path interpolations in rm, mkdir, cp, codesign, and deployment tasks, including BIN_DIR/APP_NAME usages.
Linux Build Configuration
v3/internal/commands/build_assets/linux/Taskfile.yml
Quoted template substitutions in docker run, mv, cp, wails3, and sign commands to prevent word-splitting for paths and APP_NAME.
Windows Build Configuration
v3/internal/commands/build_assets/windows/Taskfile.yml
Wrapped APP_NAME/BIN_DIR usages in quotes for build:native, build:docker, sign, and sign:installer tasks to preserve spaces in executables/installers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Bug, v3-alpha, cli

Suggested reviewers

  • leaanthony

Poem

🐰 I hopped through Taskfiles, quick and bright,
Wrapped every path to keep names tight,
From Android to Mac, Linux, Windows too,
APP_NAME stays whole — no splits to rue,
A nimble hop — builds run through the night! 🎩🐇

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding quote handling to build commands across multiple platforms to support spaces in variables like APP_NAME.
Description check ✅ Passed The description follows the template structure with a clear summary, type of change selected, and testing platforms checked. However, testing details are missing and the issue reference is incomplete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4dd2cf7 and f340a5a.

📒 Files selected for processing (1)
  • v3/UNRELEASED_CHANGELOG.md
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-10-08T22:11:37.054Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation.
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-09-15T11:08:01.900Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation.
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-10-08T22:11:37.054Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation to differentiate them from Go template variables.
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-09-15T21:32:51.758Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation to differentiate them from Go template variables.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Run Go Tests v3 (macos-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (ubuntu-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (windows-latest, 1.24)
🔇 Additional comments (1)
v3/UNRELEASED_CHANGELOG.md (1)

33-34: ✅ Changelog entry properly addressed.

The entry correctly documents the fix, with the typo resolved ("operating systems"), proper section placement under "Fixed," and clear attribution. This aligns with both the PR's bug-fix classification and Keep a Changelog conventions.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (5)
v3/internal/commands/build_assets/linux/Taskfile.yml (3)

117-117: Consider quoting all path arguments consistently.

The -binary argument is quoted, but -icon, -desktopfile, -outputdir, and paths within -builddir are not. For consistency and to handle spaces uniformly, quote all path-based arguments.

🔎 Proposed refactor
-      - wails3 generate appimage -binary "{{.APP_NAME}}" -icon {{.ICON}} -desktopfile {{.DESKTOP_FILE}} -outputdir {{.OUTPUT_DIR}} -builddir {{.ROOT_DIR}}/build/linux/appimage/build
+      - wails3 generate appimage -binary "{{.APP_NAME}}" -icon "{{.ICON}}" -desktopfile "{{.DESKTOP_FILE}}" -outputdir "{{.OUTPUT_DIR}}" -builddir "{{.ROOT_DIR}}/build/linux/appimage/build"

190-190: Consider quoting PGP_KEY and SIGN_ROLE to handle spaces.

If PGP_KEY or SIGN_ROLE contain spaces or special characters, the current unquoted usage could cause parsing issues.

🔎 Proposed refactor
-      - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}*.deb" --pgp-key {{.PGP_KEY}} {{if .SIGN_ROLE}}--role {{.SIGN_ROLE}}{{end}}
+      - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}*.deb" --pgp-key "{{.PGP_KEY}}" {{if .SIGN_ROLE}}--role "{{.SIGN_ROLE}}"{{end}}

204-204: Consider quoting PGP_KEY to handle spaces.

If PGP_KEY contains spaces or special characters, the current unquoted usage could cause parsing issues.

🔎 Proposed refactor
-      - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}*.rpm" --pgp-key {{.PGP_KEY}}
+      - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}*.rpm" --pgp-key "{{.PGP_KEY}}"
v3/internal/commands/build_assets/windows/Taskfile.yml (1)

166-166: Consider quoting certificate, thumbprint, and timestamp arguments.

If SIGN_CERTIFICATE, SIGN_THUMBPRINT, or TIMESTAMP_SERVER contain spaces, the current unquoted usage could cause parsing issues.

🔎 Proposed refactor for line 166
-      - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.exe" {{if .SIGN_CERTIFICATE}}--certificate {{.SIGN_CERTIFICATE}}{{end}} {{if .SIGN_THUMBPRINT}}--thumbprint {{.SIGN_THUMBPRINT}}{{end}} {{if .TIMESTAMP_SERVER}}--timestamp {{.TIMESTAMP_SERVER}}{{end}}
+      - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.exe" {{if .SIGN_CERTIFICATE}}--certificate "{{.SIGN_CERTIFICATE}}"{{end}} {{if .SIGN_THUMBPRINT}}--thumbprint "{{.SIGN_THUMBPRINT}}"{{end}} {{if .TIMESTAMP_SERVER}}--timestamp "{{.TIMESTAMP_SERVER}}"{{end}}
🔎 Proposed refactor for line 180
-      - wails3 tool sign --input "build/windows/nsis/{{.APP_NAME}}-installer.exe" {{if .SIGN_CERTIFICATE}}--certificate {{.SIGN_CERTIFICATE}}{{end}} {{if .SIGN_THUMBPRINT}}--thumbprint {{.SIGN_THUMBPRINT}}{{end}} {{if .TIMESTAMP_SERVER}}--timestamp {{.TIMESTAMP_SERVER}}{{end}}
+      - wails3 tool sign --input "build/windows/nsis/{{.APP_NAME}}-installer.exe" {{if .SIGN_CERTIFICATE}}--certificate "{{.SIGN_CERTIFICATE}}"{{end}} {{if .SIGN_THUMBPRINT}}--thumbprint "{{.SIGN_THUMBPRINT}}"{{end}} {{if .TIMESTAMP_SERVER}}--timestamp "{{.TIMESTAMP_SERVER}}"{{end}}

Also applies to: 180-180

v3/internal/commands/build_assets/darwin/Taskfile.yml (1)

176-176: Consider quoting ENTITLEMENTS, SIGN_IDENTITY, and KEYCHAIN_PROFILE.

If these variables contain spaces, the current unquoted usage could cause parsing issues.

🔎 Proposed refactor for line 176
-      - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.app" --identity "{{.SIGN_IDENTITY}}" {{if .ENTITLEMENTS}}--entitlements {{.ENTITLEMENTS}}{{end}}
+      - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.app" --identity "{{.SIGN_IDENTITY}}" {{if .ENTITLEMENTS}}--entitlements "{{.ENTITLEMENTS}}"{{end}}

Note: SIGN_IDENTITY is already quoted.

🔎 Proposed refactor for line 192
-      - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.app" --identity "{{.SIGN_IDENTITY}}" {{if .ENTITLEMENTS}}--entitlements {{.ENTITLEMENTS}}{{end}} --notarize --keychain-profile {{.KEYCHAIN_PROFILE}}
+      - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.app" --identity "{{.SIGN_IDENTITY}}" {{if .ENTITLEMENTS}}--entitlements "{{.ENTITLEMENTS}}"{{end}} --notarize --keychain-profile "{{.KEYCHAIN_PROFILE}}"

Also applies to: 192-192

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3256041 and 7b147fc.

📒 Files selected for processing (6)
  • v3/UNRELEASED_CHANGELOG.md
  • v3/internal/commands/build_assets/android/Taskfile.yml
  • v3/internal/commands/build_assets/darwin/Taskfile.yml
  • v3/internal/commands/build_assets/ios/Taskfile.yml
  • v3/internal/commands/build_assets/linux/Taskfile.yml
  • v3/internal/commands/build_assets/windows/Taskfile.yml
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-10-08T22:11:37.054Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation.
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-09-15T11:08:01.900Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation.
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-10-08T22:11:37.054Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation to differentiate them from Go template variables.
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-09-15T21:32:51.758Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation to differentiate them from Go template variables.
📚 Learning: 2024-10-08T22:11:37.054Z
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-10-08T22:11:37.054Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation.

Applied to files:

  • v3/internal/commands/build_assets/linux/Taskfile.yml
  • v3/internal/commands/build_assets/darwin/Taskfile.yml
📚 Learning: 2024-10-08T22:11:37.054Z
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-10-08T22:11:37.054Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation to differentiate them from Go template variables.

Applied to files:

  • v3/internal/commands/build_assets/linux/Taskfile.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Run Go Tests v3 (macos-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (windows-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (ubuntu-latest, 1.24)
🔇 Additional comments (5)
v3/internal/commands/build_assets/linux/Taskfile.yml (1)

75-75: LGTM!

The quoting changes correctly protect path arguments containing spaces in mv, cp, and wails3 commands.

Also applies to: 115-116, 152-152, 157-157, 162-162, 169-169

v3/internal/commands/build_assets/windows/Taskfile.yml (1)

44-44: LGTM!

The quoting changes correctly handle spaces in APP_NAME while leaving shell-expanded variables (GO_CACHE_MOUNT, REPLACE_MOUNTS) unquoted as needed.

Also applies to: 71-71

v3/internal/commands/build_assets/darwin/Taskfile.yml (1)

68-68: LGTM!

The quoting changes correctly protect path arguments while leaving shell-expanded variables unquoted as needed.

Also applies to: 71-71, 141-144, 151-151, 161-165

v3/internal/commands/build_assets/android/Taskfile.yml (1)

128-128: LGTM!

The quoting changes correctly handle spaces in file paths for cp and adb install commands.

Also applies to: 137-137, 205-205, 218-218

v3/internal/commands/build_assets/ios/Taskfile.yml (1)

64-64: LGTM!

The comprehensive quoting of path arguments across rm, mkdir, cp, codesign, and xcrun commands correctly handles spaces in APP_NAME and related paths.

Also applies to: 78-82, 106-106, 114-114, 136-137, 228-232, 256-260

Comment thread v3/internal/commands/build_assets/linux/Taskfile.yml Outdated
Comment thread v3/UNRELEASED_CHANGELOG.md Outdated
@leaanthony leaanthony enabled auto-merge (squash) January 2, 2026 00:12
@sonarqubecloud

sonarqubecloud Bot commented Jan 2, 2026

Copy link
Copy Markdown

@leaanthony leaanthony merged commit 0b6dfe0 into wailsapp:v3-alpha Jan 2, 2026
48 checks passed
@klgd

klgd commented Jan 3, 2026

Copy link
Copy Markdown

There was a bug in macOS, the command mkdir -p "{{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/{MacOS,Resources}" did not generate a MacOS and Resources directory, the command generate a {MacOS, Resources} directory

@leaanthony

Copy link
Copy Markdown
Member

There was a bug in macOS, the command mkdir -p "{{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/{MacOS,Resources}" did not generate a MacOS and Resources directory, the command generate a {MacOS, Resources} directory

Gah, thanks for letting us know! I'll update the tests to verify this scenario along with a fix 🙏

Grantmartin2002 pushed a commit to Grantmartin2002/wails that referenced this pull request Apr 29, 2026
* fix: improve darwin build commands to accommodate spaces in APP_NAME

* fix: improve android build commands to accommodate spaces in APP_NAME

* fix: improve ios build commands to accommodate spaces in APP_NAME

* fix: improve linux build commands to accommodate spaces in APP_NAME

* fix: improve windows build commands to accommodate spaces in APP_NAME

* docs: update `v3/UNRELEASED_CHANGELOG.md`

* fix(docs): correct changelog

* fix: remove quotes around GO_CACHE_MOUNT and REPLACE_MOUNTS

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
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