mirror of
https://forgejo.mixinet.net/actions/checkout.git
synced 2025-06-15 14:50:45 -06:00
Exclude path from clean
This commit is contained in:
parent
85e6279cec
commit
9a73efb9ba
6 changed files with 28 additions and 5 deletions
|
@ -11,6 +11,7 @@ export async function prepareExistingDirectory(
|
|||
repositoryPath: string,
|
||||
repositoryUrl: string,
|
||||
clean: boolean,
|
||||
exclude_from_clean: string | undefined,
|
||||
ref: string
|
||||
): Promise<void> {
|
||||
assert.ok(repositoryPath, 'Expected repositoryPath to be defined')
|
||||
|
@ -90,7 +91,7 @@ export async function prepareExistingDirectory(
|
|||
// Clean
|
||||
if (clean) {
|
||||
core.startGroup('Cleaning the repository')
|
||||
if (!(await git.tryClean())) {
|
||||
if (!(await git.tryClean(exclude_from_clean))) {
|
||||
core.debug(
|
||||
`The clean command failed. This might be caused by: 1) path too long, 2) permission issue, or 3) file in use. For further investigation, manually run 'git clean -ffdx' on the directory '${repositoryPath}'.`
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue