laytan / setup-odin

MIT License
15 stars 2 forks source link

Branch input defaults to undefined string #27

Closed thetarnav closed 4 months ago

thetarnav commented 4 months ago

When the branch input is not specified it defaults to "undefined" instead of "master" or something more sane.

/usr/bin/git clone https://github.com/odin-lang/Odin /home/runner/odin --branch undefined --depth=1 --single-branch --no-tags

nvm, looking at the inputs it seems that it actually defaults to master... where did the undefined come from then

Run laytan/setup-odin@v2
  with:
    release: false
    llvm-version: 17
    cache: true
    branch: master
    build-type: debug
    repository: https://github.com/odin-lang/Odin
Warning: Invalid access token, falling back to git based install.
Main cache key: linux-https://github.com/odin-lang/Odin-undefined-debug-llvm_17
LLVM 17 comes pre-installed on this runner
Main cache MISS
/usr/bin/git clone https://github.com/odin-lang/Odin /home/runner/odin --branch undefined --depth=1 --single-branch --no-tags
Cloning into '/home/runner/odin'...
warning: Could not find remote branch undefined to clone.
fatal: Remote branch undefined not found in upstream origin
Error: The process '/usr/bin/git' failed with exit code 128
laytan commented 4 months ago

Thanks! Should be fixed now.

Also, I recommend testing this out with cache disabled, in my experience it is actually slower to use the cache than just fetching every run.