Skip to content

Commit 9136ce8

Browse files
committedNov 14, 2020
Don't enforce that checkout path must be inside of Github Workspace
Fixes actions#327, Fixes actions#197. And i also hit this.
1 parent 5a4ac90 commit 9136ce8

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed
 

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
8282
# Default: true
8383
persist-credentials: ''
8484

85-
# Relative path under $GITHUB_WORKSPACE to place the repository
85+
# Path relative to $GITHUB_WORKSPACE to place the repository
8686
path: ''
8787

8888
# Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching

‎action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ inputs:
4949
description: 'Whether to configure the token or SSH key with the local git config'
5050
default: true
5151
path:
52-
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
52+
description: 'Path relative to $GITHUB_WORKSPACE to place the repository'
5353
clean:
5454
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
5555
default: true

‎src/input-helper.ts

-9
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,6 @@ export function getInputs(): IGitSourceSettings {
4040
githubWorkspacePath,
4141
result.repositoryPath
4242
)
43-
if (
44-
!(result.repositoryPath + path.sep).startsWith(
45-
githubWorkspacePath + path.sep
46-
)
47-
) {
48-
throw new Error(
49-
`Repository path '${result.repositoryPath}' is not under '${githubWorkspacePath}'`
50-
)
51-
}
5243

5344
// Workflow repository?
5445
const isWorkflowRepository =

0 commit comments

Comments
 (0)
Failed to load comments.