Skip to content

Commit

Permalink
Let compile_resources script work with downloaded repos
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Feb 9, 2024
1 parent e4efaba commit 099443c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/compile_resources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ Else {
$GITHUB_REPOSITORY = $Env:GITHUB_HEAD_REPOSITORY
If (-not $GITHUB_REPOSITORY) {
$repo_url = git config --get remote.origin.url
$GITHUB_REPOSITORY = $repo_url.substring(19, $repo_url.length - 19) -replace '\.git', ''
# Validate in case the repo was downloaded rather than cloned
If ($repo_url) {
$GITHUB_REPOSITORY = $repo_url.substring(19, $repo_url.length - 19) -replace '\.git', ''
}
}
If (-not $GITHUB_REPOSITORY) {
$GITHUB_REPOSITORY = 'Toufool/AutoSplit'
Expand Down

0 comments on commit 099443c

Please sign in to comment.