feat(cli): detect Cargo --profile
argument (#1598)
This commit is contained in:
parent
c6258cf633
commit
85836034ff
1 changed files with 7 additions and 6 deletions
|
@ -460,12 +460,13 @@ class Builder {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const src = join(
|
let outputFolder = this.options.release ? 'release' : 'debug'
|
||||||
this.targetDir,
|
if (this.options.cargoOptions?.includes('--profile')) {
|
||||||
this.target.triple,
|
const args = this.options.cargoOptions
|
||||||
this.options.release ? 'release' : 'debug',
|
const profileIndex = args.indexOf('--profile')
|
||||||
srcName,
|
outputFolder = args[profileIndex + 1]
|
||||||
)
|
}
|
||||||
|
const src = join(this.targetDir, this.target.triple, outputFolder, srcName)
|
||||||
const dest = join(this.outputDir, destName)
|
const dest = join(this.outputDir, destName)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue