hrszpuk / rectx

The powerful little project manager for the ReCT programming language!
GNU General Public License v3.0
6 stars 1 forks source link

Template snapshotting will search for *any* file called "commands" could cause conflicts #57

Closed hrszpuk closed 1 year ago

hrszpuk commented 1 year ago

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:

  1. Create a directory for the snapshot
  2. Create a file in the snapshot directory called "commands.rct"
  3. Write some basic ReCT code in the "commands.rct" file.
  4. 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?).

hrszpuk commented 1 year ago

chaotic evil