I have an admittedly dev version of Rockcraft here that is using the new InitCommand but has no templates.
To Reproduce
Run toolcraft init where toolcraft has no templates dir
part yaml
No response
Relevant log output
❯ rockcraft init
rockcraft internal error: FileNotFoundError(2, 'No such file or directory')
Full execution log: '/home/tiago/.local/state/rockcraft/log/rockcraft-20241024-091607.807534.log'
Traceback (most recent call last):
File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_application/application.py", line 600, in run
return_code = self._run_inner()
File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_application/application.py", line 550, in _run_inner
dispatcher.load_command(self.app_config),
File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_cli/dispatcher.py", line 246, in load_command
self._loaded_command.fill_parser(parser)
File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_application/commands/init.py", line 79, in fill_parser
choices=self.profiles,
File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_application/commands/init.py", line 98, in profiles
template_dirs = [
File "/snap/rockcraft/x1/lib/python3.10/site-packages/craft_application/commands/init.py", line 98, in <listcomp>
template_dirs = [
File "/snap/rockcraft/x1/usr/lib/python3.10/pathlib.py", line 1017, in iterdir
for name in self._accessor.listdir(self):
FileNotFoundError: [Errno 2] No such file or directory: '/snap/rockcraft/x1/lib/python3.10/site-packages/rockcraft/templates'
Bug Description
I have an admittedly dev version of Rockcraft here that is using the new InitCommand but has no templates.
To Reproduce
Run
toolcraft init
wheretoolcraft
has notemplates
dirpart yaml
No response
Relevant log output