Skip to content

[BUG] Action flips forward slash into backslash resulting in match failure.  #340

@zacker150

Description

@zacker150

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

Somewhere between the Run actions/github-script@v5 and Run bash $GITHUB_ACTION_PATH/entrypoint.sh steps, it converts the input filename DownloaderForReddit/version.py to DownloaderForReddit\version.py. However, the files it matches against still have the forward slash, resulting in a filed match.

To Reproduce

I have the following snippet in my workflow:

- uses: actions/checkout@v2
  with:
    fetch-depth: 0

- name: Check Version
  uses: tj-actions/[email protected]
  id: check-version
  with:
    files: DownloaderForReddit/version.py
    since_last_remote_commit: "true"

What OS are you seeing the problem on?

windows-latest or windows-2019

Expected behavior?

DownloaderForReddit/version.py should be listed under matching changed files instead of non-matching changed files.

Relevant log output

Run tj-actions/[email protected]
  with:
    files: DownloaderForReddit/version.py
    since_last_remote_commit: true
    token: ***
    separator:  
    sha: 9a1e3aab73023bb041d204f5a870052b7d250041
Run # "Set base sha..."
  # "Set base sha..."
  if [[ -n "" ]]; then
    echo "::set-output name=base_sha::"
  elif [[ "true" == "true" ]]; then
    if [[ "ad80d5851914ea765fb9576f7ca870574357fca8" != "0000000000000000000000000000000000000000" ]]; then
      echo "::set-output name=base_sha::ad80d5851914ea765fb9576f7ca870574357fca8"
    else
      echo "::set-output name=base_sha::9a1e3aab73023bb041d204f5a870052b7d250041"
    fi
  fi
  shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
Run tj-actions/glob@v5
  with:
    files: DownloaderForReddit/version.py
    files-separator:  
    separator: |
    token: ***
    files-from-source-file-separator: 
  
    follow-symbolic-links: true
    strip-top-level-dir: true
Run actions/github-script@v5
  with:
    github-token: ***
    script: const path = require("path");
  
  const { GITHUB_ACTION_PATH } = process.env
  const ACTION_PATH = path.join(GITHUB_ACTION_PATH, "main.js")
  
  const main = require(ACTION_PATH)
  await main({ core, glob })
  
    debug: false
    user-agent: actions/github-script
    result-encoding: json
  env:
    GITHUB_ACTION_PATH: D:\a\_actions\tj-actions\glob\v5
    GITHUB_WORKSPACE: D:\a\DownloaderForReddit\DownloaderForReddit
    INPUT_FILES: DownloaderForReddit/version.py
    INPUT_FILES_FROM_SOURCE_FILE: 
    INPUT_FILES_SEPARATOR:  
    INPUT_FILES_FROM_SOURCE_FILE_SEPARATOR: 
  
    INPUT_FOLLOW_SYMBOLIC_LINKS: true
    INPUT_SEPARATOR: |
    INPUT_STRIP_TOP_LEVEL_DIR: true


Run bash $GITHUB_ACTION_PATH/entrypoint.sh
  bash $GITHUB_ACTION_PATH/entrypoint.sh
  shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
  env:
    GITHUB_SERVER_URL: https://github.com
    GITHUB_REPOSITORY: zacker150/DownloaderForReddit
    GITHUB_BASE_REF: 
    INPUT_SHA: 9a1e3aab73023bb041d204f5a870052b7d250041
    INPUT_BASE_SHA: ad80d5851914ea765fb9576f7ca870574357fca8
    INPUT_TOKEN: ***
    INPUT_FILES_PATTERN: DownloaderForReddit\version.py
    INPUT_SEPARATOR:  
    INPUT_PATH: 
changed-files
  Resolving repository path...
  Setting up 'temp_changed_files' remote...
  No 'temp_changed_files' remote found
  Creating 'temp_changed_files' remote...
  Getting HEAD info...
  Retrieving changes between ad80d5851914ea765fb9576f7ca870574357fca8 (remotes/origin/master~1) → 9a1e3aab73023bb041d204f5a870052b7d250041 (build_test)
  Getting diff...
  Input files pattern: DownloaderForReddit\version.py
  Non Matching changed files: .github/workflows/Build.yml CHANGE_LOG.md DownloaderForReddit/gui/settings/display_settings_widget.py DownloaderForReddit/gui/settings/download_settings_widget.py DownloaderForReddit/gui/settings/imgur_settings_widget.py DownloaderForReddit/gui/settings/output_settings_widget.py DownloaderForReddit/gui/settings/schedule_settings_widget.py DownloaderForReddit/gui/settings/settings_dialog.py DownloaderForReddit/gui/widgets/object_settings_widget.py DownloaderForReddit/guiresources/settings/core_settings_widget_auto.py DownloaderForReddit/guiresources/settings/display_settings_widget_auto.py DownloaderForReddit/guiresources/settings/download_settings_widget_auto.py DownloaderForReddit/guiresources/settings/output_settings_widget_auto.py DownloaderForReddit/guiresources/settings/settings_dialog_auto.py DownloaderForReddit/scheduling/scheduler.py DownloaderForReddit/scheduling/tasks.py DownloaderForReddit/version.py Resources/ui_files/settings/core_settings_widget.ui Resources/ui_files/settings/display_settings_widget.ui Resources/ui_files/settings/download_settings_widget.ui Resources/ui_files/settings/output_settings_widget.ui Resources/ui_files/settings/settings_dialog.ui
  Non Matching modified files: .github/workflows/Build.yml CHANGE_LOG.md DownloaderForReddit/gui/settings/display_settings_widget.py DownloaderForReddit/gui/settings/download_settings_widget.py DownloaderForReddit/gui/settings/imgur_settings_widget.py DownloaderForReddit/gui/settings/output_settings_widget.py DownloaderForReddit/gui/settings/schedule_settings_widget.py DownloaderForReddit/gui/settings/settings_dialog.py DownloaderForReddit/gui/widgets/object_settings_widget.py DownloaderForReddit/guiresources/settings/core_settings_widget_auto.py DownloaderForReddit/guiresources/settings/display_settings_widget_auto.py DownloaderForReddit/guiresources/settings/download_settings_widget_auto.py DownloaderForReddit/guiresources/settings/output_settings_widget_auto.py DownloaderForReddit/guiresources/settings/settings_dialog_auto.py DownloaderForReddit/scheduling/scheduler.py DownloaderForReddit/scheduling/tasks.py DownloaderForReddit/version.py Resources/ui_files/settings/core_settings_widget.ui Resources/ui_files/settings/display_settings_widget.ui Resources/ui_files/settings/download_settings_widget.ui Resources/ui_files/settings/output_settings_widget.ui Resources/ui_files/settings/settings_dialog.ui
  Added files: 
  Copied files: 
  Deleted files: 
  Modified files: 
  Renamed files: 
  Type Changed files: 
  Unmerged files: 
  Unknown files: 
  All changed and modified files: 
  All changed files: 
  All modified files:

Anything else?

Workflow Run: https://github.com/zacker150/DownloaderForReddit/runs/5029278989?check_suite_focus=true

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions