mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Avoid awk on macOS
I was hoping they'd have gawk installed, but I guess not.
This commit is contained in:
@@ -37,6 +37,9 @@ fn main() -> Result<()> {
|
||||
|
||||
bundle(&package, other_args)
|
||||
}
|
||||
// This is only meant to be used by the CI, since using awk for this can be a bit spotty on
|
||||
// macOS
|
||||
"known-packages" => list_known_packages(),
|
||||
_ => bail!("Unknown command '{command}'\n\n{USAGE_STRING}"),
|
||||
}
|
||||
}
|
||||
@@ -124,6 +127,18 @@ fn bundle(package: &str, mut args: Vec<String>) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// This lists the packages configured in `bundler.toml`. This is only used as part of the CI when
|
||||
/// bundling plugins.
|
||||
fn list_known_packages() -> Result<()> {
|
||||
if let Some(config) = load_bundler_config()? {
|
||||
for package in config.keys() {
|
||||
println!("{package}");
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Load the `bundler.toml` file, if it exists. If it does exist but it cannot be parsed, then this
|
||||
/// will return an error.
|
||||
fn load_bundler_config() -> Result<Option<BundlerConfig>> {
|
||||
|
||||
Reference in New Issue
Block a user