diff --git a/src/build.ts b/src/build.ts index 2ff8fb38..ca4e124f 100644 --- a/src/build.ts +++ b/src/build.ts @@ -60,7 +60,7 @@ export class BuildCommand extends Command { throw new TypeError('Could not parse the Cargo.toml') } - if (tomlContent.package ?? tomlContent.package.name) { + if (tomlContent.package?.name) { dylibName = tomlContent.package.name.replace(/-/g, '_') } else { throw new TypeError('No package.name field in Cargo.toml')