diff --git a/.changes/packager-panic-no-cargo-toml.md b/.changes/packager-panic-no-cargo-toml.md new file mode 100644 index 00000000..993deaa8 --- /dev/null +++ b/.changes/packager-panic-no-cargo-toml.md @@ -0,0 +1,6 @@ +--- +"cargo-packager": "patch" +"@crabnebula/packager": "patch" +--- + +Fix CLI failing with `Failed to read cargo metadata: cargo metadata` for non-rust projects. diff --git a/Cargo.lock b/Cargo.lock index db47fb8b..b73209a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1045,7 +1045,7 @@ dependencies = [ [[package]] name = "cargo-packager-updater" -version = "0.1.2" +version = "0.1.3" dependencies = [ "base64 0.21.7", "cargo-packager-utils", diff --git a/bindings/packager/nodejs/schema.json b/bindings/packager/nodejs/schema.json index a1578058..5dee8bf8 100644 --- a/bindings/packager/nodejs/schema.json +++ b/bindings/packager/nodejs/schema.json @@ -812,7 +812,7 @@ } }, "excludedLibs": { - "description": "List of globs of libraries to exclude from the final APpImage. For example, to exclude libnss3.so, you'd specify `libnss3*`", + "description": "List of globs of libraries to exclude from the final AppImage. For example, to exclude libnss3.so, you'd specify `libnss3*`", "type": [ "array", "null" diff --git a/bindings/packager/nodejs/src-ts/config.d.ts b/bindings/packager/nodejs/src-ts/config.d.ts index 48ef334e..0c2262ee 100644 --- a/bindings/packager/nodejs/src-ts/config.d.ts +++ b/bindings/packager/nodejs/src-ts/config.d.ts @@ -451,7 +451,7 @@ export interface AppImageConfig { [k: string]: string; } | null; /** - * List of globs of libraries to exclude from the final APpImage. For example, to exclude libnss3.so, you'd specify `libnss3*` + * List of globs of libraries to exclude from the final AppImage. For example, to exclude libnss3.so, you'd specify `libnss3*` */ excludedLibs?: string[] | null; } diff --git a/crates/packager/schema.json b/crates/packager/schema.json index a1578058..5dee8bf8 100644 --- a/crates/packager/schema.json +++ b/crates/packager/schema.json @@ -812,7 +812,7 @@ } }, "excludedLibs": { - "description": "List of globs of libraries to exclude from the final APpImage. For example, to exclude libnss3.so, you'd specify `libnss3*`", + "description": "List of globs of libraries to exclude from the final AppImage. For example, to exclude libnss3.so, you'd specify `libnss3*`", "type": [ "array", "null" diff --git a/crates/packager/src/cli/config.rs b/crates/packager/src/cli/config.rs index 3933b821..4c496c4f 100644 --- a/crates/packager/src/cli/config.rs +++ b/crates/packager/src/cli/config.rs @@ -108,7 +108,9 @@ pub fn load_configs_from_cargo_workspace( if let Some(manifest_path) = &manifest_path { metadata_cmd.manifest_path(manifest_path); } - let metadata = metadata_cmd.exec()?; + let Ok(metadata) = metadata_cmd.exec() else { + return Ok(Vec::new()); + }; let mut configs = Vec::new(); for package in metadata.workspace_packages().iter() {