Skip to content

Commit

Permalink
fix: bug resolving windows paths (#426)
Browse files Browse the repository at this point in the history
* fix: bug resolving windows paths

* Update test.yml
  • Loading branch information
jackton1 committed May 12, 2024
1 parent 145beec commit 6ed7632
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,21 @@ jobs:
- name: Test deletion of test/new.txt
uses: ./
with:
path: test
id: deleted_file_test

- name: Show output
run: |
echo "Changed files: ${{ steps.deleted_file_test.outputs.changed_files }}"
- name: Display deleted file test result
if: "contains(steps.deleted_file_test.outputs.changed_files, 'test/new.txt')"
if: "contains(steps.deleted_file_test.outputs.changed_files, 'new.txt')"
run: |
echo "Deletion detected: ${{ steps.deleted_file_test.outputs.changed_files }}"
- name: Verify Deletion of test/new.txt
if: "!contains(steps.deleted_file_test.outputs.changed_files, 'test/new.txt')"
if: "!contains(steps.deleted_file_test.outputs.changed_files, 'new.txt')"
run: |
echo "No Deletion detected: (Not expected)"
exit 1
8 changes: 7 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ echo "::debug::Separator: $INPUT_SEPARATOR"

git config --global core.quotepath "$INPUT_QUOTEPATH"

OS=$(uname -s)

if [[ -n $INPUT_PATH ]]; then
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"
if [[ "$OS" == "NT"* ]] || [[ "$OS" == "MINGW"* ]] || [[ "$OS" == *"MSYS"* ]]; then
REPO_DIR="$GITHUB_WORKSPACE\\$INPUT_PATH"
else
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"
fi

echo "Resolving repository path: $REPO_DIR"
if [[ ! -d "$REPO_DIR" ]]; then
Expand Down

0 comments on commit 6ed7632

Please sign in to comment.