Skip to content

Commit

Permalink
fix(rust): add the --color always args in the front of the command …
Browse files Browse the repository at this point in the history
…arguments Cammisuli#70
  • Loading branch information
sharky98 authored Dec 20, 2024
1 parent 4a05224 commit 6570d1d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/rust/src/utils/cargo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@ export async function cargoCommand(
...args: string[]
): Promise<{ success: boolean }> {
console.log(chalk.dim(`> cargo ${args.join(' ')}`));
args.push('--color', 'always');
return runProcess('cargo', ...args);
return runProcess('cargo', [ '--color', 'always', ...args]);
}

export function cargoRunCommand(
...args: string[]
): Promise<{ success: boolean }> {
console.log(chalk.dim(`> cargo ${args.join(' ')}`));
return new Promise((resolve, reject) => {
childProcess = spawn('cargo', [...args, '--color', 'always'], {
childProcess = spawn('cargo', [ '--color', 'always', ...args], {
cwd: process.cwd(),
windowsHide: true,
detached: true,
Expand Down

0 comments on commit 6570d1d

Please sign in to comment.