invoke 2.1.3 does not work when run inside bash
还没有人认领这个 Issue。
评估
调研方向
Reproduce the issue with the shown tasks.py, tasks/init.py, tasks/build.py, and tasks/tests.py structure using both direct invocation and bash -c "invoke -l -d". Compare the loader output for each command, focusing on why the tasks.py module is selected in the shell case. Done means the defined tasks are discovered consistently in both invocation modes.
由索引模型根据 Issue 内容生成。
描述
I have a typical folder structure with:
/tasks.py
/tasks/__init__.py
/tasks/build.py
/tasks/tests.py
Everything runes with 2.0.0, but after upgrading to 2.1.3 tasks are not found anymore.
When run invoke -l -d I get a working output:
invoke.program.parse_collection: No default namespace provided, trying to load one from disk
invoke.loader.find: FilesystemLoader find starting at '/Users/alexander.petermann/projects/abc'
invoke.loader.find: Found module: '/Users/alexander.petermann/projects/abc/tasks'
invoke.config._load_file: Didn't see any /Users/alexander.petermann/projects/abc/invoke.yaml, skipping.
....
but if I call invoke inside a bash script OR like bash -c "invoke -l -d", invoke will not find the defined tasks:
invoke.program.parse_collection: No default namespace provided, trying to load one from disk
invoke.loader.find: FilesystemLoader find starting at '/Users/alexander.petermann/projects/abc'
invoke.loader.find: Found module: ModuleSpec(name='tasks', loader=<_frozen_importlib_external.SourceFileLoader object at 0x1015fe1d0>, origin='/Users/alexander.petermann/projects/abc/tasks.py')
invoke.config._load_file: Didn't see any /Users/alexander.petermann/projects/abc/invoke.yaml, skipping.
...
- 主要语言
- Python
- 星标
- 4.8k
- 派生
- 412
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pyinvoke/invoke 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 64/100
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100