Describe the issue
During a template snapshot (rectx template snapshot), commands will be collected from a file named "commands". However, the current function searches for files named "commands" with any file extension. This could raise issues with files from other project/build tools or even the project's (user) files itself (e.g. commands.rct would cause issues with the snapshot).
To Reproduce (only necessary for code)
Steps to reproduce the behaviour described above:
Create a directory for the snapshot
Create a file in the snapshot directory called "commands.rct"
Write some basic ReCT code in the "commands.rct" file.
Outcome: rectx template snapshot will exit with a fatal error (as of better-errors, otherwise it will produce a Go error).
Expected behavior
Ideally, only certain file extensions should be searched (.txt, <none>, and .rectx perhaps?).
Describe the issue During a template snapshot (
rectx template snapshot
), commands will be collected from a file named "commands". However, the current function searches for files named "commands" with any file extension. This could raise issues with files from other project/build tools or even the project's (user) files itself (e.g.commands.rct
would cause issues with the snapshot).To Reproduce (only necessary for code) Steps to reproduce the behaviour described above:
rectx template snapshot
will exit with a fatal error (as of better-errors, otherwise it will produce a Go error).Expected behavior Ideally, only certain file extensions should be searched (
.txt
,<none>
, and.rectx
perhaps?).