magefile / mage

a Make/rake-like dev tool using Go

Home Page:https://magefile.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: -d directory contains magefiles directory does not work

turutcrane opened this issue · comments

Bug Description
-d directory contains magefiles directory does not work

What did you do?
$ mage -d DIR target

DIR contains magefiles directory.

What did you expect to happen?
Execute target in DIR/magefiles.

What actually happened?
mage stop with "No .go files marked with the mage build tag in this directory."

Environment

  • Mage Version:
    Mage Build Tool v1.14.0
    Build Date: 2022-11-04T21:23:44+09:00
    Commit: 300bbc8
    built with: go1.19.2

  • OS: windows msys2 / linux (WSL2)

Additional context
None

Ahh interesting point, yeah, -d should be smart enough to figure out if you have a magefiles directory or not, and use that if it's there.

I tryed to fix it by PR #448. Please review it.

Thank you @turutcrane for the fix