fix(cli): custom Cargo (build) target directories (#1300)

This commit is contained in:
Wodann 2022-09-09 05:54:53 -05:00 committed by GitHub
parent 22adc885d6
commit f7c26cccbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -455,7 +455,6 @@ export class BuildCommand extends Command {
const sourcePath = join( const sourcePath = join(
targetRootDir, targetRootDir,
'target',
targetDir, targetDir,
`${cargoArtifactName}${libExt}`, `${cargoArtifactName}${libExt}`,
) )
@ -523,7 +522,7 @@ export class BuildCommand extends Command {
async function findUp(dir = process.cwd()): Promise<string | null> { async function findUp(dir = process.cwd()): Promise<string | null> {
const dist = join(dir, 'target') const dist = join(dir, 'target')
if (existsSync(dist)) { if (existsSync(dist)) {
return dir return dist
} }
const dirs = dir.split(sep) const dirs = dir.split(sep)
if (dirs.length < 2) { if (dirs.length < 2) {