mirror of
https://github.com/actions/checkout.git
synced 2025-12-14 19:58:24 +00: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user