mirror of
https://github.com/actions/checkout.git
synced 2025-06-07 14:11:48 +02:00
must use ||
and not ??
when falling back to commit when ref is not provided.
Signed-off-by: James Bradlee <james.bradlee@telenor.no>
This commit is contained in:
parent
1be0f9404c
commit
0865c4bfce
3 changed files with 4 additions and 7 deletions
|
@ -62,7 +62,7 @@ export async function getInputs(): Promise<IGitSourceSettings> {
|
|||
throw new Error(`The commit SHA '${result.commit}' is not a valid SHA.`)
|
||||
}
|
||||
|
||||
result.ref = core.getInput('ref') ?? result.commit
|
||||
result.ref = core.getInput('ref') || result.commit
|
||||
if (!result.ref) {
|
||||
if (isWorkflowRepository) {
|
||||
result.ref = github.context.ref
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue