mirror of
https://github.com/pesde-pkg/pesde.git
synced 2024-12-13 11:50:36 +00:00
fix: handle disabled features
This commit is contained in:
parent
e14f350336
commit
8168bb5124
3 changed files with 7 additions and 0 deletions
|
@ -183,6 +183,7 @@ impl InstallCommand {
|
||||||
.link_dependencies(&downloaded_graph)
|
.link_dependencies(&downloaded_graph)
|
||||||
.context("failed to link dependencies")?;
|
.context("failed to link dependencies")?;
|
||||||
|
|
||||||
|
#[cfg(feature = "patches")]
|
||||||
project
|
project
|
||||||
.apply_patches(&downloaded_graph)
|
.apply_patches(&downloaded_graph)
|
||||||
.context("failed to apply patches")?;
|
.context("failed to apply patches")?;
|
||||||
|
|
|
@ -4,6 +4,7 @@ use pesde::Project;
|
||||||
mod add;
|
mod add;
|
||||||
mod auth;
|
mod auth;
|
||||||
mod config;
|
mod config;
|
||||||
|
#[cfg(any(feature = "lune", feature = "luau"))]
|
||||||
mod execute;
|
mod execute;
|
||||||
mod init;
|
mod init;
|
||||||
mod install;
|
mod install;
|
||||||
|
@ -63,6 +64,7 @@ pub enum Subcommand {
|
||||||
Outdated(outdated::OutdatedCommand),
|
Outdated(outdated::OutdatedCommand),
|
||||||
|
|
||||||
/// Executes a binary package without needing to be run in a project directory
|
/// Executes a binary package without needing to be run in a project directory
|
||||||
|
#[cfg(any(feature = "lune", feature = "luau"))]
|
||||||
#[clap(name = "x", visible_alias = "execute", visible_alias = "exec")]
|
#[clap(name = "x", visible_alias = "execute", visible_alias = "exec")]
|
||||||
Execute(execute::ExecuteCommand),
|
Execute(execute::ExecuteCommand),
|
||||||
}
|
}
|
||||||
|
@ -93,6 +95,7 @@ impl Subcommand {
|
||||||
update.run(project, multi, reqwest)
|
update.run(project, multi, reqwest)
|
||||||
}
|
}
|
||||||
Subcommand::Outdated(outdated) => outdated.run(project),
|
Subcommand::Outdated(outdated) => outdated.run(project),
|
||||||
|
#[cfg(any(feature = "lune", feature = "luau"))]
|
||||||
Subcommand::Execute(execute) => execute.run(project, reqwest),
|
Subcommand::Execute(execute) => execute.run(project, reqwest),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,12 +21,15 @@ pub enum ScriptName {
|
||||||
|
|
||||||
impl Display for ScriptName {
|
impl Display for ScriptName {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
|
#[cfg(feature = "roblox")]
|
||||||
match self {
|
match self {
|
||||||
#[cfg(feature = "roblox")]
|
#[cfg(feature = "roblox")]
|
||||||
ScriptName::RobloxSyncConfigGenerator => write!(f, "roblox_sync_config_generator"),
|
ScriptName::RobloxSyncConfigGenerator => write!(f, "roblox_sync_config_generator"),
|
||||||
#[cfg(feature = "wally-compat")]
|
#[cfg(feature = "wally-compat")]
|
||||||
ScriptName::SourcemapGenerator => write!(f, "sourcemap_generator"),
|
ScriptName::SourcemapGenerator => write!(f, "sourcemap_generator"),
|
||||||
}
|
}
|
||||||
|
#[cfg(not(feature = "roblox"))]
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue