mirror of
https://github.com/actions/checkout.git
synced 2026-01-20 07:38:53 +08:00
change: remove path.sep, add unit tests, dist
Remove path.sep during comparison with repositoryPath (did not take in account root folders) Updated and added more unit tests Updated dist/index.js
This commit is contained in:
parent
21ffcee746
commit
8461fff5eb
3 changed files with 23 additions and 3 deletions
|
|
@ -43,11 +43,11 @@ export async function getInputs(): Promise<IGitSourceSettings> {
|
|||
)
|
||||
if (
|
||||
!(result.repositoryPath + path.sep).startsWith(
|
||||
workingDirectory + path.sep
|
||||
workingDirectory
|
||||
)
|
||||
) {
|
||||
throw new Error(
|
||||
`Repository path '${result.repositoryPath}' is not under '${workingDirectory}'`
|
||||
`Repository path '${result.repositoryPath + path.sep}' is not under '${workingDirectory}'`
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue