Skip to content

Conversation

mknos
Copy link
Contributor

@mknos mknos commented May 31, 2024

  • I noticed that if I provide "long" options to rm, it gets confused and attempts to remove files starting with a dash
  • When debugging this, preprocess_options() was incorrectly deciding to save long options into new_args list; call usage() instead because this rm only supports single letter options
%perl rm --this    # before patch
rm: cannot remove '-t': No such file or directory
rm: cannot remove '-h': No such file or directory
rm: cannot remove '-i': No such file or directory
rm: cannot remove '-s': No such file or directory

* I noticed that if I provide "long" options to rm, it gets confused and attempts to remove files starting with a dash
* When debugging this, preprocess_options() was incorrectly deciding to save long options into new_args list; call usage() instead because this rm only supports single letter options

%perl rm --this    # before patch
rm: cannot remove '-t': No such file or directory
rm: cannot remove '-h': No such file or directory
rm: cannot remove '-i': No such file or directory
rm: cannot remove '-s': No such file or directory
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: rm The rm program labels May 31, 2024
@briandfoy
Copy link
Owner

changes: disable "long" options; single letter options only

@briandfoy briandfoy merged commit ddc35c7 into briandfoy:master May 31, 2024
@briandfoy briandfoy added Status: accepted The fix is accepted Type: bug an existing feature does not work and removed Priority: low get to this whenever Type: enhancement improve a feature that already exists labels May 31, 2024
@briandfoy briandfoy added Status: released there is a new release with this fix and removed Status: accepted The fix is accepted labels Sep 30, 2024
@briandfoy briandfoy self-assigned this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: rm The rm program Status: released there is a new release with this fix Type: bug an existing feature does not work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants