Skip to content

Commit c43d5df

Browse files
authored
feat(cli): associate newly created capability with the main window (#11512)
without this change the capability is not applied to any context and it might be hard for users to figure out why
1 parent 1065f63 commit c43d5df

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@tauri-apps/cli": patch:enhance
3+
"tauri-cli": patch:enhance
4+
---
5+
6+
Associate a newly created capability file with the `main` window on the `tauri add` and `tauri permission add` commands.

.github/workflows/publish-cli-js.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ jobs:
108108
- uses: Swatinem/rust-cache@v1
109109
with:
110110
key: ${{ matrix.settings.target }}
111-
working-directory: 'crates/tauri-cli/'
112111
if: ${{ matrix.settings.docker }}
113112
- name: Setup toolchain
114113
run: ${{ matrix.settings.setup }}

crates/tauri-cli/src/acl/permission/add.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ pub fn command(options: Options) -> Result<()> {
187187
capabilities.push((
188188
TomlOrJson::Json(serde_json::json!({
189189
"identifier": identifier,
190-
"platforms": expected_platforms
190+
"platforms": expected_platforms,
191+
"windows": ["main"]
191192
})),
192193
capability_path,
193194
));

crates/tauri-cli/src/mobile/ios/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pub fn get_config(
132132
log::warn!("No code signing certificates found. You must add one and set the certificate development team ID on the `bundle > iOS > developmentTeam` config value or the `{APPLE_DEVELOPMENT_TEAM_ENV_VAR_NAME}` environment variable. To list the available certificates, run `tauri info`.");
133133
None
134134
}
135-
1 =>None,
135+
1 => None,
136136
_ => {
137137
log::warn!("You must set the code signing certificate development team ID on the `bundle > iOS > developmentTeam` config value or the `{APPLE_DEVELOPMENT_TEAM_ENV_VAR_NAME}` environment variable. Available certificates: {}", teams.iter().map(|t| format!("{} (ID: {})", t.name, t.id)).collect::<Vec<String>>().join(", "));
138138
None

0 commit comments

Comments
 (0)