Skip to content

Commit id fetching doesn't work if checked out to a subdirectory #232

Description

@gottagofaster236

Here is a repro commit.

This uses vcpkg as a submodule and the repository is checked out to the "plugin" subdirectory.
The following is printed in this action:

Running command '/usr/bin/git' with args 'submodule,status,/home/runner/work/RewardsTheater/RewardsTheater/plugin/vcpkg' in current directory '/home/runner/work/RewardsTheater/RewardsTheater'.
fatal: not a git repository (or any of the parent directories): .git

That's because this git status command is run in /home/runner/work/RewardsTheater/RewardsTheater which is indeed not a git repository—the plugin subdirectory is.

This is a regression: such an error wasn't occuring on 6fe6989.
With that commit, it instead runs (as expected)

Running command '/usr/bin/git' with args 'rev-parse,HEAD' in current directory '/home/runner/work/RewardsTheater/RewardsTheater/plugin/vcpkg'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions