Skip to content

Commit 8c49385

Browse files
committed
chore: revert indentations
Signed-off-by: ShigrafS <shigrafsalik@proton.me>
1 parent f2ce25c commit 8c49385

File tree

4 files changed

+57
-57
lines changed

4 files changed

+57
-57
lines changed

crates/tauri-bundler/src/bundle/macos/sign.rs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ pub fn notarize_without_stapling(
8383
#[derive(Debug, thiserror::Error)]
8484
pub enum NotarizeAuthError {
8585
#[error(
86-
"The team ID is now required for notarization with app-specific password as authentication. Please set the `APPLE_TEAM_ID` environment variable. You can find the team ID in https://developer.apple.com/account#MembershipDetailsCard."
87-
)]
86+
"The team ID is now required for notarization with app-specific password as authentication. Please set the `APPLE_TEAM_ID` environment variable. You can find the team ID in https://developer.apple.com/account#MembershipDetailsCard."
87+
)]
8888
MissingTeamId,
8989
#[error(transparent)]
9090
Anyhow(#[from] anyhow::Error),
@@ -107,37 +107,37 @@ pub fn notarize_auth() -> Result<tauri_macos_sign::AppleNotarizationCredentials,
107107
(Some(_apple_id), Some(_password), None) => Err(NotarizeAuthError::MissingTeamId),
108108
_ => {
109109
match (var_os("APPLE_API_KEY"), var_os("APPLE_API_ISSUER"), var("APPLE_API_KEY_PATH")) {
110-
(Some(key_id), Some(issuer), Ok(key_path)) => {
111-
Ok(tauri_macos_sign::AppleNotarizationCredentials::ApiKey { key_id, key: tauri_macos_sign::ApiKey::Path( key_path.into()), issuer })
112-
},
113-
(Some(key_id), Some(issuer), Err(_)) => {
114-
let mut api_key_file_name = OsString::from("AuthKey_");
115-
api_key_file_name.push(&key_id);
116-
api_key_file_name.push(".p8");
117-
let mut key_path = None;
110+
(Some(key_id), Some(issuer), Ok(key_path)) => {
111+
Ok(tauri_macos_sign::AppleNotarizationCredentials::ApiKey { key_id, key: tauri_macos_sign::ApiKey::Path( key_path.into()), issuer })
112+
},
113+
(Some(key_id), Some(issuer), Err(_)) => {
114+
let mut api_key_file_name = OsString::from("AuthKey_");
115+
api_key_file_name.push(&key_id);
116+
api_key_file_name.push(".p8");
117+
let mut key_path = None;
118118

119-
let mut search_paths = vec!["./private_keys".into()];
120-
if let Some(home_dir) = dirs::home_dir() {
121-
search_paths.push(home_dir.join("private_keys"));
122-
search_paths.push(home_dir.join(".private_keys"));
123-
search_paths.push(home_dir.join(".appstoreconnect").join("private_keys"));
124-
}
119+
let mut search_paths = vec!["./private_keys".into()];
120+
if let Some(home_dir) = dirs::home_dir() {
121+
search_paths.push(home_dir.join("private_keys"));
122+
search_paths.push(home_dir.join(".private_keys"));
123+
search_paths.push(home_dir.join(".appstoreconnect").join("private_keys"));
124+
}
125125

126-
for folder in search_paths {
127-
if let Some(path) = find_api_key(folder, &api_key_file_name) {
128-
key_path = Some(path);
129-
break;
130-
}
131-
}
132-
133-
if let Some(key_path) = key_path {
134-
Ok(tauri_macos_sign::AppleNotarizationCredentials::ApiKey { key_id, key: tauri_macos_sign::ApiKey::Path(key_path), issuer })
135-
} else {
136-
Err(anyhow::anyhow!("could not find API key file. Please set the APPLE_API_KEY_PATH environment variables to the path to the {api_key_file_name:?} file").into())
137-
}
138-
}
139-
_ => Err(anyhow::anyhow!("no APPLE_ID & APPLE_PASSWORD & APPLE_TEAM_ID or APPLE_API_KEY & APPLE_API_ISSUER & APPLE_API_KEY_PATH environment variables found").into())
126+
for folder in search_paths {
127+
if let Some(path) = find_api_key(folder, &api_key_file_name) {
128+
key_path = Some(path);
129+
break;
140130
}
131+
}
132+
133+
if let Some(key_path) = key_path {
134+
Ok(tauri_macos_sign::AppleNotarizationCredentials::ApiKey { key_id, key: tauri_macos_sign::ApiKey::Path(key_path), issuer })
135+
} else {
136+
Err(anyhow::anyhow!("could not find API key file. Please set the APPLE_API_KEY_PATH environment variables to the path to the {api_key_file_name:?} file").into())
137+
}
138+
}
139+
_ => Err(anyhow::anyhow!("no APPLE_ID & APPLE_PASSWORD & APPLE_TEAM_ID or APPLE_API_KEY & APPLE_API_ISSUER & APPLE_API_KEY_PATH environment variables found").into())
140+
}
141141
}
142142
}
143143
}

crates/tauri-cli/src/build.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ pub fn setup(
167167

168168
if config_.identifier == "com.tauri.dev" {
169169
anyhow::bail!(
170-
"You must change the bundle identifier in `{bundle_identifier_source} identifier`. The default value `com.tauri.dev` is not allowed as it must be unique across applications.",
171-
);
170+
"You must change the bundle identifier in `{bundle_identifier_source} identifier`. The default value `com.tauri.dev` is not allowed as it must be unique across applications.",
171+
);
172172
}
173173

174174
if config_
@@ -177,18 +177,18 @@ pub fn setup(
177177
.any(|ch| !(ch.is_alphanumeric() || ch == '-' || ch == '.'))
178178
{
179179
anyhow::bail!(
180-
"The bundle identifier \"{}\" set in `{} identifier`. The bundle identifier string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-), and periods (.).",
181-
config_.identifier,
182-
bundle_identifier_source
183-
);
180+
"The bundle identifier \"{}\" set in `{} identifier`. The bundle identifier string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-), and periods (.).",
181+
config_.identifier,
182+
bundle_identifier_source
183+
);
184184
}
185185

186186
if config_.identifier.ends_with(".app") {
187187
log::warn!(
188-
"The bundle identifier \"{}\" set in `{} identifier` ends with `.app`. This is not recommended because it conflicts with the application bundle extension on macOS.",
189-
config_.identifier,
190-
bundle_identifier_source
191-
);
188+
"The bundle identifier \"{}\" set in `{} identifier` ends with `.app`. This is not recommended because it conflicts with the application bundle extension on macOS.",
189+
config_.identifier,
190+
bundle_identifier_source
191+
);
192192
}
193193

194194
if let Some(before_build) = config_.build.before_build_command.clone() {
@@ -203,14 +203,14 @@ pub fn setup(
203203
.map(|p| p.join(web_asset_path.file_name().unwrap()))
204204
.unwrap_or_else(|| std::env::current_dir().unwrap().join(web_asset_path));
205205
return Err(anyhow::anyhow!(
206-
"Unable to find your web assets, did you forget to build your web app? Your frontendDist is set to \"{}\" (which is `{}`).",
207-
web_asset_path.display(), absolute_path.display(),
208-
));
206+
"Unable to find your web assets, did you forget to build your web app? Your frontendDist is set to \"{}\" (which is `{}`).",
207+
web_asset_path.display(), absolute_path.display(),
208+
));
209209
}
210210
if web_asset_path.canonicalize()?.file_name() == Some(std::ffi::OsStr::new("src-tauri")) {
211211
return Err(anyhow::anyhow!(
212-
"The configured frontendDist is the `src-tauri` folder. Please isolate your web assets on a separate folder and update `tauri.conf.json > build > frontendDist`.",
213-
));
212+
"The configured frontendDist is the `src-tauri` folder. Please isolate your web assets on a separate folder and update `tauri.conf.json > build > frontendDist`.",
213+
));
214214
}
215215

216216
// Issue #13287 - Allow the use of target dir inside frontendDist/distDir
@@ -235,10 +235,10 @@ pub fn setup(
235235

236236
if !out_folders.is_empty() {
237237
return Err(anyhow::anyhow!(
238-
"The configured frontendDist includes the `{:?}` {}. Please isolate your web assets on a separate folder and update `tauri.conf.json > build > frontendDist`.",
239-
out_folders,
240-
if out_folders.len() == 1 { "folder" } else { "folders" }
241-
));
238+
"The configured frontendDist includes the `{:?}` {}. Please isolate your web assets on a separate folder and update `tauri.conf.json > build > frontendDist`.",
239+
out_folders,
240+
if out_folders.len() == 1 { "folder" } else { "folders" }
241+
));
242242
}
243243
}
244244

crates/tauri-cli/src/bundle.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ fn sign_updaters(
262262

263263
// get the private key
264264
let private_key = std::env::var("TAURI_SIGNING_PRIVATE_KEY")
265-
.map_err(|_| anyhow::anyhow!("A public key has been found, but no private key. Make sure to set `TAURI_SIGNING_PRIVATE_KEY` environment variable."))?;
265+
.map_err(|_| anyhow::anyhow!("A public key has been found, but no private key. Make sure to set `TAURI_SIGNING_PRIVATE_KEY` environment variable."))?;
266266
// check if private_key points to a file...
267267
let maybe_path = Path::new(&private_key);
268268
let private_key = if maybe_path.exists() {
@@ -307,7 +307,7 @@ fn print_signed_updater_archive(output_paths: &[PathBuf]) -> crate::Result<()> {
307307
for path in output_paths {
308308
writeln!(
309309
printable_paths,
310-
"        {}",
310+
" {}",
311311
tauri_utils::display_path(path)
312312
)?;
313313
}

crates/tauri-cli/src/mobile/android/build.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ pub struct Options {
3939
pub debug: bool,
4040
/// Which targets to build (all by default).
4141
#[clap(
42-
short,
43-
long = "target",
44-
action = ArgAction::Append,
45-
num_args(0..),
46-
value_parser(clap::builder::PossibleValuesParser::new(Target::name_list()))
47-
)]
42+
short,
43+
long = "target",
44+
action = ArgAction::Append,
45+
num_args(0..),
46+
value_parser(clap::builder::PossibleValuesParser::new(Target::name_list()))
47+
)]
4848
pub targets: Option<Vec<String>>,
4949
/// List of cargo features to activate
5050
#[clap(short, long, action = ArgAction::Append, num_args(0..))]

0 commit comments

Comments
 (0)