mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-12 22:47:08 +02:00
chore: edition 2024
This commit is contained in:
100 files changed
+276
-253
No files matched your search
@@ -9,8 +9,8 @@ use crate::open::Program;
|
||||
use crate::process::Command;
|
||||
|
||||
use regex::Regex;
|
||||
use tauri::ipc::ScopeObject;
|
||||
use tauri::Manager;
|
||||
use tauri::ipc::ScopeObject;
|
||||
|
||||
/// Allowed representation of `Execute` command arguments.
|
||||
#[derive(Debug, Clone, serde::Deserialize)]
|
||||
@@ -162,8 +162,8 @@ pub enum Error {
|
||||
|
||||
/// The sidecar program validated but failed to find the sidecar path.
|
||||
#[error(
|
||||
"The scoped sidecar command was validated, but failed to create the path to the command: {0}"
|
||||
)]
|
||||
"The scoped sidecar command was validated, but failed to create the path to the command: {0}"
|
||||
)]
|
||||
Sidecar(String),
|
||||
|
||||
/// The named command was not found in the scoped config.
|
||||
@@ -172,12 +172,14 @@ pub enum Error {
|
||||
|
||||
/// A command variable has no value set in the arguments.
|
||||
#[error(
|
||||
"Scoped command argument at position {0} must match regex validation {1} but it was not found"
|
||||
)]
|
||||
"Scoped command argument at position {0} must match regex validation {1} but it was not found"
|
||||
)]
|
||||
MissingVar(usize, String),
|
||||
|
||||
/// At least one argument did not pass input validation.
|
||||
#[error("Scoped command argument at position {index} was found, but failed regex validation {validation}")]
|
||||
#[error(
|
||||
"Scoped command argument at position {index} was found, but failed regex validation {validation}"
|
||||
)]
|
||||
Validation {
|
||||
/// Index of the variable.
|
||||
index: usize,
|
||||
@@ -214,7 +216,9 @@ impl OpenScope {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
log::warn!("open() command called but the plugin configuration denies calls from JavaScript; set `tauri.conf.json > plugins > shell > open` to true or a validation regex string");
|
||||
log::warn!(
|
||||
"open() command called but the plugin configuration denies calls from JavaScript; set `tauri.conf.json > plugins > shell > open` to true or a validation regex string"
|
||||
);
|
||||
return Err(Error::Validation {
|
||||
index: 0,
|
||||
validation: "tauri^".to_string(), // purposefully impossible regex
|
||||
|
||||
Reference in new issue
Block a user