Skip to content

Commit 9746e28

Browse files
authored
Merge pull request #554 from nextcloud/fix/clean
fix: git clean syntax
2 parents af1984d + 76d2168 commit 9746e28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gitUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { existsSync, mkdirSync} from 'node:fs'
22
import { join } from 'node:path'
3-
import { simpleGit } from 'simple-git'
3+
import { CleanOptions, simpleGit } from 'simple-git'
44

55
import { CACHE_DIRNAME, CherryPickResult, ROOT_DIR, Task, WORK_DIRNAME } from './constants.js'
66
import { debug, error } from './logUtils.js'
@@ -39,7 +39,7 @@ export const cloneAndCacheRepo = async (task: Task, backportBranch: string): Pro
3939
await git.clone(`https://github.com/${owner}/${repo}`, '.')
4040
} else {
4141
// Is already a repository so make sure it is clean and follows the default branch
42-
await git.clean(['-X', '-d', '-f'])
42+
await git.clean(CleanOptions.FORCE + CleanOptions.IGNORED_ONLY + CleanOptions.RECURSIVE)
4343
debug(task, `Repo already cached at ${cachedRepoRoot}`)
4444
}
4545
} catch (e) {

0 commit comments

Comments
 (0)