Skip to content

Commit

Permalink
fix(cli): respect CARGO_BUILD_TARGET env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Apr 1, 2022
1 parent 11967de commit bd08787
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cli/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ export class BuildCommand extends Command {
)} field in ${chalk.underline(chalk.yellowBright('Cargo.toml'))}`,
})

targetTripleDir = Option.String('--target', process.env.RUST_TARGET ?? '', {
description: `Bypass to ${chalk.green('cargo build --target')}`,
})
targetTripleDir = Option.String(
'--target',
process.env.RUST_TARGET ?? process.env.CARGO_BUILD_TARGET ?? '',
{
description: `Bypass to ${chalk.green('cargo build --target')}`,
},
)

features?: string = Option.String('--features', {
description: `Bypass to ${chalk.green('cargo build --features')}`,
Expand Down

0 comments on commit bd08787

Please sign in to comment.