Skip to content

Commit

Permalink
Fix cargo install fails
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <[email protected]>
  • Loading branch information
paulober committed Oct 7, 2024
1 parent f5a54f7 commit 2143185
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/utils/rustUtil.mts
Original file line number Diff line number Diff line change
Expand Up @@ -94,32 +94,6 @@ export async function cargoInstall(
}
);

if (stderr) {
// TODO: find better solution
if (
stderr.toLowerCase().includes("already exists") ||
stderr.toLowerCase().includes("to your path") ||
stderr.toLowerCase().includes("is already installed") ||
stderr.toLowerCase().includes("yanked in registry")
) {
Logger.debug(
LoggerSource.rustUtil,
`Cargo package '${packageName}' is already installed ` +
"or cargo bin not in PATH:",
stderr
);

return true;
}

Logger.error(
LoggerSource.rustUtil,
`Failed to install cargo package '${packageName}': ${stderr}`
);

return false;
}

return true;
} catch (error) {
const msg = unknownErrorToString(error);
Expand Down

0 comments on commit 2143185

Please sign in to comment.