Skip to content

Commit

Permalink
Merge pull request #140 from PyO3/fix-139
Browse files Browse the repository at this point in the history
Use unshift instead of push to allow passing rustc args
  • Loading branch information
messense authored Jan 29, 2023
2 parents 5ed602b + c899fff commit 0b1189a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11898,7 +11898,6 @@ async function innerMain() {
const inputArgs = core.getInput('args');
const args = (0, string_argv_1.default)(inputArgs);
const command = core.getInput('command');
args.unshift(command);
const target = getRustTarget(args);
let useDocker = false;
let manylinux = core.getInput('manylinux').replace(/^manylinux_?/, '');
Expand All @@ -11914,7 +11913,7 @@ async function innerMain() {
}
if (IS_LINUX) {
if (manylinux.length > 0 && manylinux !== 'auto') {
args.push('--manylinux', manylinux);
args.unshift('--manylinux', manylinux);
}
const container = core.getInput('container');
if (container !== 'off') {
Expand All @@ -11927,10 +11926,11 @@ async function innerMain() {
}
}
if (target.length > 0 && !args.includes('--target')) {
args.push('--target', target);
args.unshift('--target', target);
}
}
const maturinRelease = await findVersion(args);
args.unshift(command);
let exitCode;
if (useDocker) {
const container = await getDockerContainer(target, manylinux);
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ async function innerMain(): Promise<void> {
const inputArgs = core.getInput('args')
const args = stringArgv(inputArgs)
const command = core.getInput('command')
args.unshift(command)
const target = getRustTarget(args)

let useDocker = false
Expand All @@ -759,7 +758,7 @@ async function innerMain(): Promise<void> {

if (IS_LINUX) {
if (manylinux.length > 0 && manylinux !== 'auto') {
args.push('--manylinux', manylinux)
args.unshift('--manylinux', manylinux)
}
// User can disable Docker build by set manylinux/container to off
const container = core.getInput('container')
Expand All @@ -773,11 +772,12 @@ async function innerMain(): Promise<void> {
}

if (target.length > 0 && !args.includes('--target')) {
args.push('--target', target)
args.unshift('--target', target)
}
}

const maturinRelease = await findVersion(args)
args.unshift(command)

let exitCode: number
if (useDocker) {
Expand Down

0 comments on commit 0b1189a

Please sign in to comment.