feat(cli): use CARGO_TARGET_DIR
if set (#1251)
* feat: use `CARGO_TARGET_DIR` if set * use `||` instead of `??` * use `CARGO_BUILD_TARGET_DIR` also if set * disable eslint prefer-nullish-coalescing
This commit is contained in:
parent
cb6fffd73f
commit
9be7ae2bf9
1 changed files with 6 additions and 1 deletions
|
@ -409,7 +409,12 @@ export class BuildCommand extends Command {
|
|||
}
|
||||
}
|
||||
|
||||
const targetRootDir = await findUp(cwd)
|
||||
const targetRootDir =
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
process.env.CARGO_TARGET_DIR ||
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
process.env.CARGO_BUILD_TARGET_DIR ||
|
||||
(await findUp(cwd))
|
||||
|
||||
if (!targetRootDir) {
|
||||
throw new TypeError('No target dir found')
|
||||
|
|
Loading…
Reference in a new issue