mirror of
https://github.com/actions/checkout.git
synced 2025-07-12 08:40:45 +00:00
If no sparse-checkout
parameter is specified, disable it
This should allow users to reuse existing folders when running `actions/checkout` where a previous run asked for a sparse checkout but the current run does not ask for a sparse checkout. This fixes https://github.com/actions/checkout/issues/1475 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
b4ffde65f4
commit
5adf77fbfc
4 changed files with 10 additions and 1 deletions
|
@ -208,7 +208,9 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||
}
|
||||
|
||||
// Sparse checkout
|
||||
if (settings.sparseCheckout) {
|
||||
if (!settings.sparseCheckout) {
|
||||
await git.disableSparseCheckout()
|
||||
} else {
|
||||
core.startGroup('Setting up sparse checkout')
|
||||
if (settings.sparseCheckoutConeMode) {
|
||||
await git.sparseCheckout(settings.sparseCheckout)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue