mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-18 16:57:19 +02:00
fix(shell): fix schema requiring sidecar property even though it is optional (#1839)
* fix(shell): fix schema requiring `sidecar` property even though it is optional * fix clippy * make `cmd` and `sidecar` exclusive * make args optional * cleanup --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
+10
-8
@@ -24,14 +24,16 @@ enum FsScopeEntry {
|
||||
},
|
||||
}
|
||||
|
||||
// Ensure scope entry is kept up to date
|
||||
impl From<FsScopeEntry> for scope::EntryRaw {
|
||||
fn from(value: FsScopeEntry) -> Self {
|
||||
match value {
|
||||
FsScopeEntry::Value(path) => scope::EntryRaw::Value(path),
|
||||
FsScopeEntry::Object { path } => scope::EntryRaw::Object { path },
|
||||
}
|
||||
}
|
||||
// Ensure `FsScopeEntry` and `scope::EntryRaw` is kept in sync
|
||||
fn _f() {
|
||||
match scope::EntryRaw::Value(PathBuf::new()) {
|
||||
scope::EntryRaw::Value(path) => FsScopeEntry::Value(path),
|
||||
scope::EntryRaw::Object { path } => FsScopeEntry::Object { path },
|
||||
};
|
||||
match FsScopeEntry::Value(PathBuf::new()) {
|
||||
FsScopeEntry::Value(path) => scope::EntryRaw::Value(path),
|
||||
FsScopeEntry::Object { path } => scope::EntryRaw::Object { path },
|
||||
};
|
||||
}
|
||||
|
||||
const BASE_DIR_VARS: &[&str] = &[
|
||||
|
||||
@@ -13,10 +13,9 @@ use std::{
|
||||
|
||||
use serde::Deserialize;
|
||||
|
||||
#[doc(hidden)]
|
||||
#[derive(Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum EntryRaw {
|
||||
pub(crate) enum EntryRaw {
|
||||
Value(PathBuf),
|
||||
Object { path: PathBuf },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user